STM32F030F4
Moderators: RoccoMarco, barthess
Re: STM32F030F4
Hi everyone and Eddie,
I tried your tested code, but I can not run it. When the code was compiling, I got following error:
When I added the this line (#define _CHIBIOS_RT_CONF_) in chconf.h, the problem was solved, but another error is triggered.
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?
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?
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: STM32F030F4
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
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
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:
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?
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?
- Attachments
-
- STM32F030F4-ChibiOS-test.zip
- (18.57 KiB) Downloaded 168 times
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: STM32F030F4
Hi,
If you run with debug options enabled and nothing is caught then errors are not likely.
Giovanni
If you run with debug options enabled and nothing is caught then errors are not likely.
Giovanni
Re: STM32F030F4
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
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
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: STM32F030F4
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
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
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
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
Who is online
Users browsing this forum: No registered users and 11 guests