MCUXpresso User Startup File

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

MCUXpresso User Startup File

ソリューションへジャンプ
2,718件の閲覧回数
kaarthick
Contributor II

Please tell me how to use own startup file instead of system generated.

0 件の賞賛
1 解決策
2,491件の閲覧回数
BlackNight
NXP Employee
NXP Employee

>>If I make duplicate of the same file , exclude original startup file from build then its working fine.Is this right way?

yes, but do this in the project, not in the SDK respository.

If you modify the startup code in the SDK (from where the projects get created/copied), then of course this will affect all projects you will generate from that SDK. I recommend that you add the SDKs as ZIP files to the IDE, then the files will be copied and you keep the original SDK files intact.

pastedImage_1.png

I hope this helps,

Erich

元の投稿で解決策を見る

0 件の賞賛
10 返答(返信)
2,491件の閲覧回数
BlackNight
NXP Employee
NXP Employee

Maybe you could be more specific (device used, what is exactly what you want to accomplish)?

But the startup code with the SDK is not 'generated': it is added to the project at project creation time, and you are free to change it, delete and replace it or whatever you want.

I hope this helps,

Erich

0 件の賞賛
2,491件の閲覧回数
kaarthick
Contributor II

Hai Erich,

I am using MK10DN512VLQ controller with MCUXpresso. Using SDK Development tool I Generated SDK for the same. Every time i create new project i found startup file loaded from sdk. if i change anything in that startup file, the same will affect on another project also. If i delete startup file and add it into another folder with correction which i want, i am facing debug issue which points to sdk generated file is missing. 

Now i need solution which eliminate sdk generated startup from compilation or linking.

I think Linking stage makes an error. Where i can change the startup path for linker. 

0 件の賞賛
2,491件の閲覧回数
lpcxpresso_supp
NXP Employee
NXP Employee

Changing the startup file in one project does not affect there startup file of other projects. What actually is the problem you think you are seeing?

Regards,

MCUXpresso IDE Support

0 件の賞賛
2,491件の閲覧回数
kaarthick
Contributor II

I am using MCUXpresso IDE. Controller used MK10DN512VLQ. SDK downloaded from SDK Development tool Kit.

Startup file added to project from that SDK. if i modify from startup file, this will affect another project also.

If I make duplicate of the same file , exclude original startup file from build then its working fine.Is this right way?

0 件の賞賛
2,492件の閲覧回数
BlackNight
NXP Employee
NXP Employee

>>If I make duplicate of the same file , exclude original startup file from build then its working fine.Is this right way?

yes, but do this in the project, not in the SDK respository.

If you modify the startup code in the SDK (from where the projects get created/copied), then of course this will affect all projects you will generate from that SDK. I recommend that you add the SDKs as ZIP files to the IDE, then the files will be copied and you keep the original SDK files intact.

pastedImage_1.png

I hope this helps,

Erich

0 件の賞賛
2,283件の閲覧回数
Lukas_Frank
Senior Contributor I

Hi after a long time.

How can I create own startup file if I do not want to use a SDK project? So, how can I do that without manipulate existing one.  For example, in the IMXRT1024 model there is a startup file named "startup_mimxrt1024.c". What is the logic of behind the startup_mimxrt1024.c file. How compiler knows to go into it firstly before run "void main()" function?

タグ(1)
0 件の賞賛
2,280件の閲覧回数
converse
Senior Contributor V

When the processor boots, it loads the stack pointer and PC from address 0x0 and 0x4 which are the first two entries of the vector table. By convention NXP  specify ResetISR as the PC (but it can be called anything). This function is the executed, which in the provided startup code, performs necessary processor initialisation, copies initialised vales from flash to RAM, sets up the C (or C++) libraries and then finally calls main(). It’s a complex process and needs to be done correctly, in the right order for your C code to run correctly.

why do you want to write this yourself, when the tools do this for you?

0 件の賞賛
2,264件の閲覧回数
Lukas_Frank
Senior Contributor I

Actually, I'm not focusing directly to do this. There is an obscurity around how processors knows startup_mimxrt1024.c file for entry file point. I'm new on NXP and I could not find a entry point input for determining file name on MCUxpresso IDE. I could not find any specifier related to the startup_mimxrt1024.c file. Could you explain where this information is in the processors and MCUxpresso IDE.

 

Thanks and Regards. 

0 件の賞賛
2,261件の閲覧回数
converse
Senior Contributor V

Suggest you read about Cortex-M processors from ARM about how the boot. But, briefly

Processor reads stack pointer from0x0 and PC from 0x4. These are the first two entries of the vector table.

the vector table is defined in the startup file

the rest boots from there.

0 件の賞賛
2,490件の閲覧回数
kaarthick
Contributor II

Thanks . Its helping me

0 件の賞賛