So far I got compiled in SW4STM32 (by Ac6) demo project for STM32L1_NUCLEO working on the Nucleo board.
For this I did the following:
- Copied whole directory of ChibiOS_16.1.5 into my working directory.
- Set path to Ac6 GCC in C/C++ Build environment
- Copied all tools utilities to Ac6 tools. They provide only make and rm
- Added correct paths for os, board, test directories links in the project. (They are not in C:\Chibios, of course)
- Added <machine/types.h> to include list. Otherwise types like uint8_t and others were not defined.
- probably made some other adjustments. (Need to do everything one more time with writing each step to recall all things)
- Finally got the project compiled. It got as same size as compiled in ChibiStudio. Since the board by default has similar LED blinking as RT version, made small change - 50ms of LED on and 950 ms of LED off
- Downloaded the hex file into the board by using STM32 ST-LINK Utility and ran it. Ran Tera term at 38400 and pressed user button on the board. Test passed successfully. Note: programming the board with binary file does not look like working option
During compilation got the following messages:
Code: Select all
Description Resource Path Location Type
Program "gcc" not found in PATH RT-STM32L152RE-NUCLEO [Discovery Options] page in project properties C/C++ Problem
Symbol 'NULL' could not be resolved main.c /RT-STM32L152RE-NUCLEO line 58 Semantic Error
Symbol 'NULL' could not be resolved main.c /RT-STM32L152RE-NUCLEO line 63 Semantic Error
Symbol 'size_t' could not be resolved main.c /RT-STM32L152RE-NUCLEO line 27 Semantic Error
Symbol 'size_t' could not be resolved main.c /RT-STM32L152RE-NUCLEO line 27 Semantic Error
Symbol 'size_t' could not be resolved main.c /RT-STM32L152RE-NUCLEO line 27 Semantic Error
Symbol 'true' could not be resolved main.c /RT-STM32L152RE-NUCLEO line 32 Semantic Error
Symbol 'true' could not be resolved main.c /RT-STM32L152RE-NUCLEO line 69 Semantic Error
However, how I said, the program is working.
Need to find where
NULL,
size_t,
true defined and figure out which part could not find gcc
What I could not do so far:
- Run GDB.
- Import exported file separately from the whole bunch of demos and get it compiled. However, it was my first approach. May be after I compiled project from the whole directory I will be able to do it.
- Start native SW4STM32 project and add RT project to it. Seems like I was able to add all needed files, but IDE could not compile the project at all. I believe, this option would allow to have GDB right away, but...
Giovanni,
Could you help with a couple of things:
1. Show me where
NULL,
size_t, and
true defined? I think, this should be easy.
2. Help to figure out how to tune GDB? While combining SW4STM32 project structure with ChibiOS would be great, if debugging works, I can live with simpler project interaction.
3. Figure out who could not find gcc. It probably less important, while would be better to eliminate this error message.
I will not deny some help from anybody else