9 years, 5 months ago.

mbed SDK porting for new H/W

Hi,

I have followed steps explained in SDK porting, I am able to execute hello program from "libraries/tests/mbed/hello" with my basic port.

Next I want to integrate CM4 onchip SYSTick, so I have configured Systick in hal_tick.c by calling SysTick_Config, but not sure whether I have to implement SYSTick irq handler or its already implemented and I have set something to enable it?

I see some refernce to SYSTick in rtos folder, so I tried to call software_init_hook from SystemInit, I have compiled libmbed.a and rtos using -r option but while building hello program, I get linking error "undefined reference to `software_init_hook'"

pl. provide some pointers on what I am missing?

how do I use rtos along with mbed?

Question relating to:

one more info, I am using gcc arm-none-eabi-gcc version arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.7.4 20130913 (release) [ARM/embedded-4_7-branch revision 202601] Copyright (C) 2012 Free Software Foundation, Inc.

posted by Shankar Bandal 11 Nov 2014

1 Answer

9 years, 5 months ago.

Hi,

what do you need systick for? that one is used mainly by RTOS, no handler is defined in the mbed library. IF you want to use systick, it should be outside of the mbed library otherwise it won't link with mbed RTOS.

Regards,
0xc0170

I think my understanding was wrong, I was assuming that enabling systick is part of mbed porting, but if it is already handle in rtos then I will do only SysTickConfig. now next part of my question is linking issue, I am calling software_init_hook from my reset handler but I am getting link error, what I m missing . I am referring to STM CM4 gcc arm based code for my port where they are not calling above rtos hook but they call _start in reset handler.

My understanding is that rtos is core layer and mbed is porting layer, but how and where they are connected is not clear , some documentation or pointers will be helpful.

posted by Shankar Bandal 11 Nov 2014