Patriot Posted February 6, 2018 Posted February 6, 2018 Hi all! I tried to run DCS-bios on the STM32 board and with some corrections it worked. Yes, in the current form it slows down and works worse, but if fix the block for DOS BIOS_IRQ_SERIAL (or block for Slave) that it will fly! First correction: Add this code in top of file: char *utoa (unsigned int __val, char *__s, int __radix) { if (!__builtin_constant_p (__radix)) { extern char *__utoa (unsigned int, char *, int); return __utoa (__val, __s, __radix); } else if (__radix < 2 || __radix > 36) { *__s = 0; return __s; } else { extern char *__utoa_ncheck (unsigned int, char *, unsigned char); return __utoa_ncheck (__val, __s, __radix); } } And board will be work with #define DCSBIOS_DEFAULT_SERIAL, but very-very slow. Ok, we can make second fix: change default Serial on Serial2 in DcsBios.h: #ifdef DCSBIOS_DEFAULT_SERIAL namespace DcsBios { ProtocolParser parser; void setup() { Serial2.begin(250000); } void loop() { while (Serial2.available()) { parser.processChar(Serial2.read()); } PollingInput::pollInputs(); ExportStreamListener::loopAll(); } } bool sendDcsBiosMessage(const char* msg, const char* arg) { Serial2.write(msg); Serial2.write(' '); Serial2.write(arg); Serial2.write(' '); } #endif Already better, but still slow - this you can see on the video. I do not have enough knowledge to write the correct code for working with a Serial port through registers. Ian, it will be great if you can support this board in DCS-BIOS, because stm32 all better Arduino nano. Well, or someone else, if Ian refuses.. Arduino nano: 16Mhz, Flash: 32KB RAM: 2KB UART: 1 I2C: 1 PWM: 0-255 Analog read: 0-1024 Price: $1.8 Stm32: 72MHz Flash: 64KB RAM 20KB UART: 3 I2C: 3 PWM: 0-4096 Analog read: 0-65535 Native USB Price: $2 My cockpit A-10C Строю кокпит A-10C i7 7700k, 32Gb RAM, SSD NVMe, GTX 1080, Hotas Warthog, HTC Vive. ----------------- With love from Russia
v81 Posted June 6, 2021 Posted June 6, 2021 Necroing here, but keen to see STM32 support myself. Currently using a MEGA2560 and even with it's extra ram (8KiB vs 2KiB) over the micro I'm still running out. R7 3800X - 32Gig RAM -- All SSD -- GTX1070 -- TM Warthog, MFG Crosswinds & TiR
milit Posted March 18, 2023 Posted March 18, 2023 Interested too. Are there any projects based on STM32? =WRAG=345 R7 5800X @ 4,8 GHz; DDR4 64Gb RAM (+32Gb swap); Radeon RX 6800 16Gb; 3840x2160; Oculus Quest 3; Win10-64
Recommended Posts