Hello,
I am trying to port a piece of cpp code from ChibiOS18.2.1 to 19.1.3 using NUCLEO144 STM32F767ZI and run into problems. After spending a whole day trying different approaches I have narrow down problem to a simple blinker code where a blinker thread class is defined and then is started inside the main function.
I have created two projects: for ver.18 and ver.19 (both attached). The main.cpp is the same in both of them and configuration files are taken from demos/STM32/RT-STM32F767ZI-NUCLEO144. Makefiles differs only to respect differences in building process between two versions of OS. The version for 18 works as expected while for 19 hangs during initialization. I tried another board, Discovery F407, and there was no problem. I have used gcc 6.3.1 but also tried the recent 9.2.1 with no positive effects.
I had also problem during linking of ver. 19 which was related to missing _exit, _kill and _getpid. Adding __attribute__((used)) in the definition of the functions inside syscalls_cpp.cpp fixed the problem. The ver. 18 didn't needed such action.
At this moment I have run out of options (appart from sticking to version 18.2.1) and I would really appreciate any hint what I could try to do.
Thanks in advance,
Jurek
Running cpp code on NUCLEO144 STM32F767ZI using ChibiOS 19
Moderators: RoccoMarco, barthess
Running cpp code on NUCLEO144 STM32F767ZI using ChibiOS 19
- Attachments
-
- blink_19.zip
- (13.59 KiB) Downloaded 150 times
-
- blink_18.zip
- (13.28 KiB) Downloaded 147 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: Running cpp code on NUCLEO144 STM32F767ZI using ChibiOS 19
Are you using the 'distribution zip' of 19.1.3? If so, update at least \os\common\startup\ARMCMx\compilers\GCC\ld\rules_code.ld from SVN; there's a fix to a problem linking with static objects.
- 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: Running cpp code on NUCLEO144 STM32F767ZI using ChibiOS 19
Thanks steved, this is the file to replace:
Giovanni
Giovanni
Re: Running cpp code on NUCLEO144 STM32F767ZI using ChibiOS 19
Thanks a lot for your fast help! Now it works as expected.
I was using distribution version of 19.1.3 but I better switch to the branch 19.1.x from current repo.
Best regards,
Jurek
P.S. Giovanni, in your rules_code.ld.7z you posted, the variables names are incompatible with the rest of the os, e.g., it is __init_array_base__ vs __init_array_start as I think it should be, and etc, but after correcting this everything goes as expected. Thanks again!
I was using distribution version of 19.1.3 but I better switch to the branch 19.1.x from current repo.
Best regards,
Jurek
P.S. Giovanni, in your rules_code.ld.7z you posted, the variables names are incompatible with the rest of the os, e.g., it is __init_array_base__ vs __init_array_start as I think it should be, and etc, but after correcting this everything goes as expected. Thanks again!
- 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: Running cpp code on NUCLEO144 STM32F767ZI using ChibiOS 19
Yes, some names changed for consistency in the newest version, you did the right thing.
BTW, you could switch to latest code safely, it is stable and will be released soon as version 20.x.
Giovanni
BTW, you could switch to latest code safely, it is stable and will be released soon as version 20.x.
Giovanni
Who is online
Users browsing this forum: No registered users and 41 guests