Page 2 of 2

Re: Yet another OSX Rant - Peculiar issue

Posted: Tue Jan 10, 2017 6:40 pm
by Krish2487
It seems more and more likely that your post about the USB Serial not being compiled along with the main code is spot on.

I uploaded the binary of the above sketch (compiled using arduino IDE) using maple_upload and was able to observe the serial output in terminal monitor.

Even platformIO was able to see the serial port!!.
Next I compiled the binary using the platformio and uploaded from within the platformio IDE (using the same maple_upload and dfu upload).
But this time the board was stuck and the serial port was lost. The board as reported earlier, reverted to the six quick flashes and slow flashing and then stopped altogether.

Unfortunately platformio uses Scons for the build engine, which is beyond my immediate understanding to manipulate.
Hence I requested a complete command of compiling the binary. I wanted to compile the same binary manually using the toolchain packaged along with platformio and check the results.. then see what is the difference in the Scons script and the STM32duino compilation process.

Thank you for the help so far roger!! :-)

Re: Yet another OSX Rant - Peculiar issue

Posted: Wed Jan 11, 2017 4:25 am
by Krish2487

Changing the board definition from a generic_STM32F103C8 board to "maple_mini" solved the issue.
I am guessing the generic_STM32F103C8 boards do not, by definition, compile the USB Serial libraries.

I am now able to upload and compile the code from within platformio using the maple_upload script.


Thank you for all the help extended roger!! :-)

Re: Yet another OSX Rant - Peculiar issue

Posted: Wed Jan 11, 2017 5:05 am
by RogerClark
I'm glad its working, but you will still have some issues if you set the board as Maple mini, because it probably wont reset the USB correctly then you press upload from the IDE.

Take a look in boards.txt generic stm32f103c in the upload menu it what defines are setup.

Re: Yet another OSX Rant - Peculiar issue

Posted: Wed Jan 11, 2017 6:21 am
by Krish2487
I did.
The differences between maple_mini and genericstm32f103c8 seem to be pretty much in the compilation and linking of the USB Serial and the reset vector address.
Oh and the available flash and RAM.

I can live with the manual reset of the board post upload.
So far, though, I have tried about 50-70 times since yesterday night. It has always uploaded reliably.

I always have to reset the board after upload to get it to start the sketch. It is a very acceptable compromise. :-)