Page 1 of 1
[SOLVED] shell problem with STM32F103
Posted: Wed May 16, 2012 10:18 am
by Tectu
Hey Guys,
I modified the ARMCM3-STM32F103-FATFS example that it fits to my board. After compiling and flashing, I get the ch> promt on SD2. But when I type in "help" or "test" (which is a valid command, defined in the main.c), nothing happends. Even the LED stops blinking. So I guess it's some bigger issue.
I guess that it is not depending on working SD card stuff, since 'help' should aways work?
Can someone say anything to this?
I guess I don't need to provide any code...
~ Tectu
Re: shell problem with STM32F103
Posted: Wed May 16, 2012 10:36 am
by mabl
Hello Tectu,
I once ran into this issue. Basically the demo does some strcmp which uses newlib. But these external calls result in invalid asm calls - so the cpu goes into unhandled exception -> LED stopes blinking. I had this issue with the summon arm toolchain - and never figured out what went wrong exactly.
I've switched to
https://github.com/jsnyder/arm-eabi-toolchain and never looked back.
Re: shell problem with STM32F103
Posted: Wed May 16, 2012 10:39 am
by Tectu
Hey mabl,
Thank you for your answer - I use the summon-arm-toolchain

I guess I'll just switch to the other one then

Thanks for your advice - will mark this thread as [SOLVED] as soon as it works
~ Tectu
Re: shell problem with STM32F103
Posted: Wed May 16, 2012 11:02 am
by Tectu
P.S. Is there really no simple way arround? Does someone know something?
It's always a pain to bring such things to work under archlinux.
For the first run, installing the jsnyder toolchain didn't work - summon-arm-toolchain worked on my archlinux directly.
I don't need the shell right now, I just want to use the SD card - and I have a deadline. So maybe I should just stripp down the example.
Please tell me, if somebody knows anything about how to fix this.
~ Tectu
Re: shell problem with STM32F103
Posted: Wed May 16, 2012 11:17 am
by mabl
You could also look at this new official toolchain
viewtopic.php?f=3&t=267. It is already built and statically linked -> should work out of the box. I have not yet tried it since changing toolchains always is troublesome...
Re: shell problem with STM32F103
Posted: Wed May 16, 2012 12:08 pm
by Tectu
Hello mabl,
Thank you very very much for your help, it works now!
I use the prebuild toolchain you liked in your last post.
~ Tectu
Re: [SOLVED] shell problem with STM32F103
Posted: Thu May 31, 2012 12:49 am
by formica
I have the same problem. Simply the Shell hang up as soon as I try to send some characters through the terminal (and the led stop blinking).
Is there any solution that does not involve changing the compiler?
I'm using arm-none-eabi (summon-arm).
Re: [SOLVED] shell problem with STM32F103
Posted: Thu May 31, 2012 7:55 am
by Tectu
Well, I was at the same point whith not wanting to change the toolchain, because I liked the simply install procedure of summon-arm-toolchain.
But I changed to this toolchain now, and anything works fine:
https://launchpad.net/gcc-arm-embeddedYou don't have to compile anything. Just download, extract and set the path

Re: [SOLVED] shell problem with STM32F103
Posted: Thu May 31, 2012 10:40 am
by formica
I confirm that using also the jsnyder toolchain the problem is solved.
But still we don't know why.

formica
P.S. Thx tectu. I found the gcc-arm-embedded sources for linux... but not the precompiled bins. Can you help me?
Re: [SOLVED] shell problem with STM32F103
Posted: Thu May 31, 2012 2:06 pm
by Tectu
- go to
https://launchpad.net/gcc-arm-embedded- download the archive (green button on the right side). For example I took: gcc-arm-none-eabi-4_6-2012q1-20120316.tar.bz2
- go to download folder, unpack the archive
- go to the unpacked folder
- go to folder bin here are all your precompiled binaries
- include the that full path to your $PATH variable
you succeded when typing
arm-none-eabi-gcc -v gives folowwing output:
Code: Select all
Using built-in specs.
COLLECT_GCC=arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=/home/tectu/projects/resources/arm-toolchain/bin/../libexec/gcc/arm-none-eabi/4.6.2/lto-wrapper
Target: arm-none-eabi
Configured with: /home/build/work/jenkins-daily-build/src/gcc/configure --build=i686-linux-gnu --host=i686-linux-gnu --target=arm-none-eabi --prefix=/home/build/work/jenkins-daily-build/install-linux --enable-languages=c,c++ --disable-decimal-float --disable-libffi --disable-libgomp --disable-libmudflap --disable-libquadmath --disable-libssp --disable-libstdcxx-pch --disable-lto --disable-nls --disable-shared --disable-threads --disable-tls --with-gnu-as --with-gnu-ld --with-newlib --with-headers=yes --with-sysroot=/home/build/work/jenkins-daily-build/install-linux/arm-none-eabi --with-gmp=/home/build/work/jenkins-daily-build/build-linux/host-libs/usr --with-mpfr=/home/build/work/jenkins-daily-build/build-linux/host-libs/usr --with-mpc=/home/build/work/jenkins-daily-build/build-linux/host-libs/usr --with-ppl=/home/build/work/jenkins-daily-build/build-linux/host-libs/usr --with-cloog=/home/build/work/jenkins-daily-build/build-linux/host-libs/usr --with-libelf=/home/build/work/jenkins-daily-build/build-linux/host-libs/usr --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --with-pkgversion='GNU Tools for ARM Embedded Processors' --with-extra-multilibs=armv6-m,armv7-m,armv7e-m,armv7-r
Thread model: single
gcc version 4.6.2 20120316 (release) [ARM/embedded-4_6-branch revision 185452] (GNU Tools for ARM Embedded Processors)
(The very last line is important)