Page 3 of 3
Re: STM32F030F4
Posted: Fri Jul 17, 2015 4:30 pm
by etrombly
It works with gcc 4.7.4, thanks for all the help getting this working.
Re: STM32F030F4
Posted: Fri Aug 26, 2016 2:22 pm
by mesutevin
Hi everyone and Eddie,
I tried your tested code, but I can not run it. When the code was compiling, I got following error:
Code: Select all
Compiling chcoreasm_v7m.S
/home/mesut/ChibiOS/os/common/ports/ARMCMx/compilers/GCC/chcoreasm_v7m.S:51:2: error: #error "invalid chconf.h"
#error "invalid chconf.h"
When I added the this line (
#define _CHIBIOS_RT_CONF_) in
chconf.h, the problem was solved, but another error is triggered.
Code: Select all
Compiling chsys.c
In file included from /home/mesut/ChibiOS/os/rt/include/ch.h:83:0,
from /home/mesut/ChibiOS/os/rt/src/chsys.c:36:
/home/mesut/ChibiOS/os/rt/include/chtrace.h:93:2: error: #error "CH_CFG_TRACE_HOOK not defined in chconf.h"
#error "CH_CFG_TRACE_HOOK not defined in chconf.h"
^
In file included from /home/mesut/ChibiOS/os/rt/include/ch.h:87:0,
from /home/mesut/ChibiOS/os/rt/src/chsys.c:36:
/home/mesut/ChibiOS/os/rt/include/chsys.h:56:2: error: #error "CH_CFG_IRQ_PROLOGUE_HOOK not defined in chconf.h"
#error "CH_CFG_IRQ_PROLOGUE_HOOK not defined in chconf.h"
^
/home/mesut/ChibiOS/os/rt/include/chsys.h:60:2: error: #error "CH_CFG_IRQ_EPILOGUE_HOOK not defined in chconf.h"
#error "CH_CFG_IRQ_EPILOGUE_HOOK not defined in chconf.h"
^
/home/mesut/ChibiOS/os/common/startup/ARMCMx/compilers/GCC/rules.mk:217: recipe for target 'build/obj/chsys.o' failed
make: *** [build/obj/chsys.o] Error 1
I cloned the latest ChibiOS from github. I think the
chconf.h is old for latest version of ChibiOS.
How can I solve this problem?
Re: STM32F030F4
Posted: Fri Aug 26, 2016 2:29 pm
by Giovanni
Hi,
You are mixing incompatible chconf.h and kernel versions. Make sure to use a chconf.h from your kernel version.
The unofficial code on the community repository is not necessarily maintained and kept aligned by authors.
Giovanni
Re: STM32F030F4
Posted: Fri Aug 26, 2016 4:31 pm
by mesutevin
Thank you for your fast response. This kind of fast replies makes us feel safe
Yes, I thought so, too.
I added the following blocks in the chconf.h:
Code: Select all
#define CH_CFG_IRQ_PROLOGUE_HOOK() { \
/* IRQ prologue code here.*/ \
}
/**
* @brief ISR exit hook.
*/
#define CH_CFG_IRQ_EPILOGUE_HOOK() { \
/* IRQ epilogue code here.*/ \
}
#define CH_CFG_TRACE_HOOK(tep) { \
/* Trace code here.*/ \
}
And,
According to new file organization on new ChibiOS, I edited the Makefile.
Now, This is working for me.
I inserted the my working code to attachment.
Will you warn me if I have made a big mistake?
Re: STM32F030F4
Posted: Fri Aug 26, 2016 5:27 pm
by Giovanni
Hi,
If you run with debug options enabled and nothing is caught then errors are not likely.
Giovanni
Re: STM32F030F4
Posted: Fri Oct 13, 2017 3:55 pm
by Xela
I have this same issue with chThdSleepMilliseconds not returning, it is stuck in waiting for interrupt.
I have installed:
gcc version 5.4.0
gcc version 5.4.0
arm-none-eabi-gcc-4.9.3
Which is the recommended solution here? roll back gcc and g++ to 4.7 or replace arm-none-eabi with gcc-arm-embedded or both?
I was just about to roll back my gcc and g++ versions until I read the comment about gcc-arm-embedded... not quite sure how that fits in?
Alex
Re: STM32F030F4
Posted: Fri Oct 13, 2017 6:18 pm
by Giovanni
Hi,
chThdSleepMilliseconds() not returning could mean system tick interrupt is not triggered or the system crashed, you don't give enough context to tell.
Giovanni
Re: STM32F030F4
Posted: Wed Oct 18, 2017 11:33 am
by Xela
The combination of compilers works just fine:
gcc version 5.4.0
gcc version 5.4.0
arm-none-eabi-gcc-4.9.3
I was just using my debugger incorrectly
Alex