undefined reference to ST2MS and MS2ST

Discussions and support about ChibiOS/RT, the free embedded RTOS.
User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: undefined reference to ST2MS and MS2ST

Postby Giovanni » Fri Feb 22, 2019 5:24 pm

That warning has already been fixed in repository, it will be in next release. Note that it has no real impact.

Giovanni

e11i0t23
Posts: 11
Joined: Thu Feb 21, 2019 8:46 pm
Has thanked: 5 times

Re: undefined reference to ST2MS and MS2ST

Postby e11i0t23 » Fri Feb 22, 2019 9:25 pm

Thank you for that information and saving me yet again

when I use board files from 'os/hal/boards/ST_STM32F072B_DISCOVERY' if i just point BOARDSRC and BOARDINC to there we build fine however using our old files where we use PALConfig sample board file https://github.com/e11i0t23/qmk_firmwar ... _DISCOVERY it does not build due to Error: unknown type name 'PALConfig' however i have checked and this type can be seen from source in line 93 http://chibios.sourceforge.net/docs3/ha ... ource.html

Thanks again
ELliot

faisal
Posts: 374
Joined: Wed Jul 19, 2017 12:44 am
Has thanked: 44 times
Been thanked: 60 times

Re: undefined reference to ST2MS and MS2ST

Postby faisal » Fri Feb 22, 2019 9:45 pm

e11i0t23 wrote:Thank you for that information and saving me yet again

when I use board files from 'os/hal/boards/ST_STM32F072B_DISCOVERY' if i just point BOARDSRC and BOARDINC to there we build fine however using our old files where we use PALConfig sample board file https://github.com/e11i0t23/qmk_firmwar ... _DISCOVERY it does not build due to Error: unknown type name 'PALConfig' however i have checked and this type can be seen from source in line 93 http://chibios.sourceforge.net/docs3/ha ... ource.html

Thanks again
ELliot


The link to the documentation you included was for a particular LLD implementation (perhaps it was even for the template?). Different low level drivers behave differently. As you are interested in the STM32F0xx, look at the platform file for which LLD it uses:
https://github.com/ChibiOS/ChibiOS/blob ... orm.mk#L33

As you can see, it uses GPIOv2. Looking at GPIOv2, you can see there is no such PALConfig struct there:
https://github.com/ChibiOS/ChibiOS/blob ... _pal_lld.h

The easiest way to avoid these problems is to use an existing board.cfg XML file for the same processor, customize it as needed, and generate the .c/.h files using the FTL processing script (fmpp). If you have any issues running the fmpp program and the such, you can just copy an existing .c/.h file from the same processor in a demo project, and just modify the .h file per your configuration. The .c file stays the same ..

faisal
Posts: 374
Joined: Wed Jul 19, 2017 12:44 am
Has thanked: 44 times
Been thanked: 60 times

Re: undefined reference to ST2MS and MS2ST

Postby faisal » Fri Feb 22, 2019 10:07 pm

Btw, if you're curious as to how to use the fmpp utility to generate the board.c/.h files from the command line - look at the example already provided in ChibiOS. All or most of the board files for the demos are generated by this tool:

https://github.com/ChibiOS/ChibiOS/blob ... nboards.sh

Sorry Giovanni for constantly linking to github, it's just faster to browse and find stuff there than sourceforge ... hint, hint ... :).

e11i0t23
Posts: 11
Joined: Thu Feb 21, 2019 8:46 pm
Has thanked: 5 times

Re: undefined reference to ST2MS and MS2ST

Postby e11i0t23 » Sat Feb 23, 2019 1:04 am

Thank you all again we have manged to update and test on a few boards now however with stm32f072 board we are trying to use as a test we are getting an error compiling a chibios fil

Code: Select all

Compiling: lib/chibios/os/hal/ports/STM32/LLD/RTCv2/hal_rtc_lld.c                                  In file included from ./lib/chibios/os/hal/ports/STM32/LLD/TIMv1/hal_st_lld.h:31:0,
                 from ./lib/chibios/os/hal/include/hal_st.h:46,
                 from ./lib/chibios/os/common/ports/ARMCMx/chcore_timer.h:32,
                 from ./lib/chibios/os/common/ports/ARMCMx/chcore.h:205,
                 from ./lib/chibios/os/rt/include/ch.h:110,
                 from ./lib/chibios/os/hal/osal/rt/osal.h:32,
                 from ./lib/chibios/os/hal/include/hal.h:28,
                 from lib/chibios/os/hal/ports/STM32/LLD/RTCv2/hal_rtc_lld.c:29:
lib/chibios/os/hal/ports/STM32/LLD/RTCv2/hal_rtc_lld.c: In function 'rtc_lld_init':
./lib/chibios/os/hal/ports/STM32/STM32F0xx/stm32_registry.h:1695:45: error: 'STM32_IRQ_EXTI17_20_IRQ_PRIORITY' undeclared (first use in this function)
   nvicEnableVector(STM32_RTC_COMMON_NUMBER, STM32_IRQ_EXTI17_20_IRQ_PRIORITY)
                                             ^
lib/chibios/os/hal/ports/STM32/LLD/RTCv2/hal_rtc_lld.c:591:3: note: in expansion of macro 'STM32_RTC_IRQ_ENABLE'
   STM32_RTC_IRQ_ENABLE();
   ^
./lib/chibios/os/hal/ports/STM32/STM32F0xx/stm32_registry.h:1695:45: note: each undeclared identifier is reported only once for each function it appears in
   nvicEnableVector(STM32_RTC_COMMON_NUMBER, STM32_IRQ_EXTI17_20_IRQ_PRIORITY)
                                             ^
lib/chibios/os/hal/ports/STM32/LLD/RTCv2/hal_rtc_lld.c:591:3: note: in expansion of macro 'STM32_RTC_IRQ_ENABLE'
   STM32_RTC_IRQ_ENABLE();


I assume that i am missing a define in chconf or halconf is this correct?
I am sorry if i am asking silly/noobish questions, i do make sure to try google, and try read through the code and demos first

e11i0t23
Posts: 11
Joined: Thu Feb 21, 2019 8:46 pm
Has thanked: 5 times

Re: undefined reference to ST2MS and MS2ST

Postby e11i0t23 » Sat Feb 23, 2019 1:51 am

Found out i needed to add IRQ system settings to mcuconf now that is added the error is removed

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: undefined reference to ST2MS and MS2ST

Postby Giovanni » Sat Feb 23, 2019 9:39 am

Please make sure to take configuration files and makefiles from the version you are upgrading to.

Giovanni

e11i0t23
Posts: 11
Joined: Thu Feb 21, 2019 8:46 pm
Has thanked: 5 times

Re: undefined reference to ST2MS and MS2ST

Postby e11i0t23 » Mon Feb 25, 2019 6:15 pm

Giovanni wrote:That warning has already been fixed in repository, it will be in next release. Note that it has no real impact.

Giovanni


Any idea when this will make it to the git repo as it is used as a sub-module? also is the

Code: Select all

warning: initialization from incompatible pointer type
   .end_cb       = end_cb1,
seems to be another one we are having that doesnt effect our device as it still performs the correct behaviours and is correct based on demo materials so was wandering if this is another warning that shouldn't exist either?

faisal
Posts: 374
Joined: Wed Jul 19, 2017 12:44 am
Has thanked: 44 times
Been thanked: 60 times

Re: undefined reference to ST2MS and MS2ST

Postby faisal » Mon Feb 25, 2019 7:23 pm

Giovanni doesn't have anything to do with the Github mirror. The official ChibiOS repo is on sourceforge. Yeah, a lot of us don't like that, but it is what it is :).

Also, please post more information on that warning. Post the file, and more context from the compiler output .. Clearly, your callback declaration (end_cb1) does not match the one expected.

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: undefined reference to ST2MS and MS2ST

Postby Giovanni » Mon Feb 25, 2019 7:47 pm

hi,

Some drivers has their callbacks changed, perhaps that is one of those cases. Please provide also surrounding code, it is hard to tell by just looking at that line.

The repository will stay on subversion, I am one of those simple minds unable to grasp the beauty of vast branching and multiple repositories glued by an xml.

Giovanni


Return to “ChibiOS/RT”

Who is online

Users browsing this forum: No registered users and 4 guests