Error while compiling (El Capitan, STM32f103c8t6, FTDI RS232)

Ragnarok
Mon Aug 29, 2016 1:23 pm
Hey guys.
I’m relatively new to this field. I got my hands on an STM43f103c8t6 mini development board, and I wanted to try using it in my work. I followed this video : https://www.youtube.com/watch?v=Ze6q6NidS5w
I’ve followed all these steps, but I keep getting this error every time I try compiling anything –
Cannot run program “{runtime.tools.arm-none-eabi-gcc.path}/bin/arm-none-eabi-g++” (in directory “.”): error=2, No such file or directory

Also, my Port shows “Bluetooth_incoming_port” which I know is wrong, because I faced the same error with an Arduino Uno board, and I figured that the port wasn’t getting detected.

Any help is appreciated, thanks! :D

Better yet, if anyone has a step-by-step instruction on how to use the STM with Arduino IDE, please do tell.

Cheers!


martinayotte
Mon Aug 29, 2016 2:50 pm
You need to install the GCC for ARM using BoardManager and choosing Arduino SAM installer.

Ragnarok
Sat Sep 03, 2016 10:13 am
Hey, thanks for the reply. I did this and now I’m getting a new error:
cannot init device

Is there something wrong with the hardware?

Thanks again! :)


martinayotte
Sat Sep 03, 2016 12:19 pm
Do you mean that everything now compile, but the UpLoad failed ?
Please, provide more details such the output log.

Ragnarok
Tue Sep 06, 2016 12:20 pm
Yes, when I click on Verify, it says Done Compiling. But I try to upload, it shows me this:


Sketch uses 7,060 bytes (10%) of program storage space. Maximum is 65,536 bytes.
Global variables use 1,968 bytes of dynamic memory.
Failed to init device.
stm32flash Arduino_STM32_0.9

http://github.com/rogerclarkmelbourne/arduino_stm32

Using Parser : Raw BINARY
Interface serial_posix: 230400 8E1


RogerClark
Tue Sep 06, 2016 9:28 pm
Did you unlock / deprotect the board first ?

It may come preflashed with some code that just blinks the LED and which is locked.


Ragnarok
Wed Sep 07, 2016 12:24 pm
This is new information for me. I didn’t know we had to unlock boards.

Will Google this, and try unlocking if it is locked first. :) Thanks!


Ragnarok
Wed Sep 07, 2016 2:38 pm
I did some research. Found out that my board didn’t have anything pre flashed into it. Also, I have no errors related to the locked/protected status of the board.

I did not notice before but the LED doesn’t blink when I plug in the FTDI. Back to square one!


RogerClark
Wed Sep 07, 2016 10:01 pm
If you are uploading via USB to Serial, and the upload succeeds and code does not run, there is a possibility that the 8mhz crystal oscillator is not running.

One other forum member had this problem.

I also have one STM32 board which will run directly after upload but not run if you power cycle it. again it had a faulty oscillator.

Also. Can you confirm which version of gcc your IDE is using, I think it should be 4.8


madias
Wed Sep 07, 2016 10:46 pm
Can you post a link to your board? (sounds like the faulty “ugly board”) or if it’s the “blue pill” -> bad 10k USB resistor.

RogerClark
Wed Sep 07, 2016 11:35 pm
I think it sounds more serious than the resistor :-(

My Ugly board has a worse problem, its crystal oscillator does not start very well, which means it only seems to run directly after I upload via Serial

The Ugly board is a piece of junk anyway. I no longer use it.


Ragnarok
Thu Sep 08, 2016 2:21 pm
madias wrote:Can you post a link to your board? (sounds like the faulty “ugly board”) or if it’s the “blue pill” -> bad 10k USB resistor.

Ragnarok
Thu Sep 08, 2016 2:24 pm
RogerClark wrote:If you are uploading via USB to Serial, and the upload succeeds and code does not run, there is a possibility that the 8mhz crystal oscillator is not running.

One other forum member had this problem.

I also have one STM32 board which will run directly after upload but not run if you power cycle it. again it had a faulty oscillator.

Also. Can you confirm which version of gcc your IDE is using, I think it should be 4.8


RogerClark
Thu Sep 08, 2016 9:26 pm
Are you sure your hardware is not faulty?

Ragnarok
Mon Sep 19, 2016 1:16 pm
I finally got the beautiful thing to work! I needed it primarily for the amazing ADC it has, and it’s shoving up 129k samples per second in my face!

Next up is trying to learn to use DMA to be able to store these values in an SD card separately. Will browse around this forums for ideas, but could you point me in the right way? As in, how do I start learning about using DMA with the Arduino IDE?

PS: The board was not protected after all! I downloaded the STM Demonstrator GUI that tells if the board is protected, and it wasn’t. I kept resetting and reuploading on my friend’s Windows 10 laptop, and it worked! I don’t even know why.
PPS: Thank you everyone, for all the useful things you told me. Even though it wasn’t the primary solution, I learnt a lot after googling up solutions to the questions you guys posted! :D


Kenjutsu
Fri Nov 04, 2016 7:35 am
Were you able to get it working on your Mac?

Leave a Reply

Your email address will not be published. Required fields are marked *