cancel
Showing results for 
Search instead for 
Did you mean: 

Able to program through UART but nothing runs

allanw
Associate II
Posted on December 05, 2010 at 06:48

Able to program through UART but nothing runs

4 REPLIES 4
Posted on May 17, 2011 at 14:17

Check the code you are actually putting into the micro (disassemble the hex file). If the boot vectors, stack or startup code are wrong it's not going to run.

Hook up a JTAG/SWD so you can actually debug it.

Try using the boot loader to put some code into RAM, and run it from there.

Try coding a routine to output to the USART.

Try coding for a standard dev/eval board to prove it's not a tool chain issue, or is an issue with your hardware construction.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
allanw
Associate II
Posted on May 17, 2011 at 14:17

Thanks. I'm now trying on a dev board, using Olimex's extremely simple project. It has no assembly startup code and a very simple ld script. It works fine with the toolchain I'm using. However, my project's code doesn't run on it.

I'm guessing it's something to do with the linker script and the initialization assembly file I'm using. Where can I get a nice template project that'll actually work? Getting things to work on ARM is such a pain...

Posted on May 17, 2011 at 14:17

The STM32 FW library has plenty of run-able code. The demo version of Keil comes with an older version of the library, but the projects are point and click, and functional. The $10 VL Discovery board has a chip/jtag interface, and LEDs.

WinARM has a version of GCC and a workable project and linker script for the STM32. As I recall you have to tweak the script to reflect the specs of the actual part you are using.

The ARM has tools that make this easier than the PICs, but if you use poor tools and don't configure them properly you're going to have difficulties. Any micro feed the wrong code isn't going to work, the ARM/STM32 parts aren't any different.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
allanw
Associate II
Posted on May 17, 2011 at 14:17

Ok, I managed to get it working after taking the linker script and startup code from here: 

http://gandalf.arubi.uni-kl.de/avr_projects/arm_projects/index_cortex.html