Startup Code Crashes on K64F in KDS 3.1

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

Startup Code Crashes on K64F in KDS 3.1

ソリューションへジャンプ
543件の閲覧回数
jerrygardner
Contributor III

I've built a project for the K64F on the Freedom board using KDS 3.1. I created the project using File->New->Kinetis SDK 1.x Project.

 

At first my project was simple with just enough code to blink an LED to verify the project build process and that the board worked. The project built fine and ran fine on the board.

 

Next I added about 25 new C files to the project. The project still builds fine, but when I download it to the board and run it, it causes a reset before it even gets to my main() routine. The startup code (in startup_MK64F12.S) calls a routine called __START ("bl    __START"), which maps to a symbol called _start, which is defined in crt0.o. It's while running this code in crt0.o that the reset occurs. I haven't single-stepped the code in crt0.o yet to find exactly where this occurs. Does anyone know why this might be happening?  If I comment out the call to _start, the reset doesn't occur and my main() routine gets entered as expected. My code runs fine, except that all uninitialized data in the BSS do not get zeroed.

 

BTW, I didn't modify the startup files in any way. All I did was to add several of my own C files to the project.

ラベル(1)
0 件の賞賛
1 解決策
430件の閲覧回数
jerrygardner
Contributor III

Alice,

I found and fixed the problem. In addition to the C files that I added to my project, I also had an assembly file. This assembly file was mistakenly putting its assembled code in the .init section rather than the .text section. When I fixed this the problem went away.

元の投稿で解決策を見る

0 件の賞賛
2 返答(返信)
430件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Jerry,

Please send your project to me , i will check and test it on my side .

BR

Alice

0 件の賞賛
431件の閲覧回数
jerrygardner
Contributor III

Alice,

I found and fixed the problem. In addition to the C files that I added to my project, I also had an assembly file. This assembly file was mistakenly putting its assembled code in the .init section rather than the .text section. When I fixed this the problem went away.

0 件の賞賛