Startup.s

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Startup.s

2,011 Views
l_zhou
Contributor I

by some MCUs as i start new project from template there are .s files generated in "Startup_code" for initializing and jump into main, like MPC5777 and S32K144. But for the new types which i'm using now, only startup_xxxx.c and system_xxxx.c are generated and they refer to the __START in a library file like __arm_start.c for jumping into main entrance. The problem is i'm trying to make a sample project with Tri-Core-MCU and Single ELF file, sure there is no available example for Single ELF, and without this startup.s it's not able to specify the respective main functions for each core(main0, main1, main2). How can i get deal with such hardware related startup.s? Would like to have some hint. Thx in advance.

Labels (2)
0 Kudos
6 Replies

1,640 Views
l_zhou
Contributor I

Hi Alexander,

thx for the tip about MC_ME, i'll make another try with it. Is there any documents/introduction about such implementation? In the last weeks i've used another strategy, stupid but simple from my point of view, to realise it: rename all sections and functions in first core (to avoid the dupplication by linking) and combine the link files of two cores to generate single ELF: compiling worked and i got one ELF file, but the start functions of 3rd core was linking to the flash of 1st core although i used the 

.text :
{

...

}>3rd_core_flash 

in ld file, had no idea about it. The generated elf file could be flashed and started but only the functions in the main module of first core worked.

0 Kudos

1,640 Views
alexanderfedoto
NXP Employee
NXP Employee

l.zhou@kostal.com

well, I'm afraid there is no good example exist for Arm cores. But in general approach is the same as in PA.

You'll have to dispatch cores at boot stage on main core using MC_ME boot address for them.

0 Kudos

1,639 Views
l_zhou
Contributor I

thx Alexander, have solved the problem with Startup.s for diverse cores and now am looking for suitable linker file for squeeze everything correctly into one single ELF. Am no expert for linker file and working with multicore consists of arm cortext-m33 and -m7, any ideas?

0 Kudos

1,639 Views
alexanderfedoto
NXP Employee
NXP Employee

l.zhou@kostal.com

Could you please clarify what your target platform is: ARM or PA ?

0 Kudos

1,639 Views
l_zhou
Contributor I

It's ARM not power family otherwise i should have had very good single elf example in DS

0 Kudos

1,640 Views
alexanderfedoto
NXP Employee
NXP Employee

You can take a look at the SingleElf_MPC5748G project in S32DS exmaple projects for the reference.

pastedImage_1.png

0 Kudos