Problems when flashing a program with IAR compiler on the s32k116 board

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

Problems when flashing a program with IAR compiler on the s32k116 board

ソリューションへジャンプ
2,912件の閲覧回数
David_Estevez
Contributor I

I am using a project for an S32K116 microcontroller with the IAR Toolchain for ARM -8.x compiler.

I am flashing the program with a PE Micro Multilink. The program works in debug mode, but when I disconnect the PE Micro Multilink, power off and then power on the microcontroller, the program stops working. Could you help me with this problem?

Kind regards.

0 件の賞賛
返信
1 解決策
2,752件の閲覧回数
Robin_Shen
NXP TechSupport
NXP TechSupport

Please add START_FROM_FLASH to IAR Assembler->Preprocessor->Defined symbols 

As I mentioned before, after adding START_FROM_FLASH the S32K116EVB can work normally after power on.

S32DS ARM2.2 to IAR 8.32 S32K116 START_FROM_FLASH.jpg

元の投稿で解決策を見る

7 返答(返信)
2,887件の閲覧回数
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi

This may be caused by the lack of START_FROM_FLASH in the assembly preprocessor. Please refer to the previous discussion: S32K118 runs with debugger, but not without

Since I didn't install the IAR Toolchain for ARM -8.x compiler, I found a picture on the Internet: Assembler -> Preprocessor -> Defined symbols-> START_FROM_FLASH 

IAR Assembler Preprocessor Defined symbols START_FROM_FLASH.png


Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 件の賞賛
返信
2,873件の閲覧回数
David_Estevez
Contributor I

Hi Robin,
I have made that change just as you have shown.

David_Estevez_0-1731488718946.png

 

But I am still facing the same problem.

0 件の賞賛
返信
2,869件の閲覧回数
Robin_Shen
NXP TechSupport
NXP TechSupport

Let's check where the program went wrong by Attach to Running Target.

Attach to Running Target.pnghardfault init_data_bss.png

What is the value of SR0 you see?

0 件の賞賛
返信
2,864件の閲覧回数
David_Estevez
Contributor I

Hi again,

David_Estevez_0-1731489803671.png

This is the SR0 value.

0 件の賞賛
返信
2,844件の閲覧回数
Robin_Shen
NXP TechSupport
NXP TechSupport

It looks the same as the picture I replied to you last time. This is because the ECC error is caused by not executing the #ifdef START_FROM_FLASH code that initializes the ECC RAM.

hardfault init_data_bss START_FROM_FLASH .png

I have not finished the installation of IAR. If you find through debugging that the initialization ECC RAM code is not executed, then we should check why the definition of START_FROM_FLASH is not working.

0 件の賞賛
返信
2,753件の閲覧回数
Robin_Shen
NXP TechSupport
NXP TechSupport

Please add START_FROM_FLASH to IAR Assembler->Preprocessor->Defined symbols 

As I mentioned before, after adding START_FROM_FLASH the S32K116EVB can work normally after power on.

S32DS ARM2.2 to IAR 8.32 S32K116 START_FROM_FLASH.jpg

2,738件の閲覧回数
David_Estevez
Contributor I
Thank you for the solution!
0 件の賞賛
返信
%3CLINGO-SUB%20id%3D%22lingo-sub-1992845%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EIAR%E3%82%B3%E3%83%B3%E3%83%91%E3%82%A4%E3%83%A9%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%A6s32k116%E3%83%9C%E3%83%BC%E3%83%89%E3%81%A7%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%A0%E3%82%92%E3%83%95%E3%83%A9%E3%83%83%E3%82%B7%E3%83%A5%E3%81%99%E3%82%8B%E9%9A%9B%E3%81%AE%E5%95%8F%E9%A1%8C%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1992845%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E7%A7%81%E3%81%AF%E3%80%81ARM%20-8.x%E3%82%B3%E3%83%B3%E3%83%91%E3%82%A4%E3%83%A9%E7%94%A8%E3%81%AEIAR%E3%83%84%E3%83%BC%E3%83%AB%E3%83%81%E3%82%A7%E3%83%BC%E3%83%B3%E3%82%92%E5%82%99%E3%81%88%E3%81%9FS32K116%E3%83%9E%E3%82%A4%E3%82%AF%E3%83%AD%E3%82%B3%E3%83%B3%E3%83%88%E3%83%AD%E3%83%BC%E3%83%A9%E3%81%AE%E3%83%97%E3%83%AD%E3%82%B8%E3%82%A7%E3%82%AF%E3%83%88%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CP%3EPE%20Micro%20Multilink%E3%81%A7%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%A0%E3%82%92%E3%83%95%E3%83%A9%E3%83%83%E3%82%B7%E3%83%A5%E3%81%97%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%E3%80%82%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%A0%E3%81%AF%E3%83%87%E3%83%90%E3%83%83%E3%82%B0%E3%83%A2%E3%83%BC%E3%83%89%E3%81%A7%E5%8B%95%E4%BD%9C%E3%81%97%E3%81%BE%E3%81%99%E3%81%8C%E3%80%81PE%20Micro%20Multilink%E3%82%92%E5%88%87%E6%96%AD%E3%81%97%E3%80%81%E3%83%9E%E3%82%A4%E3%82%B3%E3%83%B3%E3%81%AE%E9%9B%BB%E6%BA%90%E3%82%92%E3%82%AA%E3%83%95%E3%81%AB%E3%81%97%E3%81%A6%E3%81%8B%E3%82%89%E9%9B%BB%E6%BA%90%E3%82%92%E5%85%A5%E3%82%8C%E3%82%8B%E3%81%A8%E3%80%81%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%A0%E3%81%8C%E5%8B%95%E4%BD%9C%E3%81%97%E3%81%AA%E3%81%8F%E3%81%AA%E3%82%8A%E3%81%BE%E3%81%99%E3%80%82%E3%81%93%E3%81%AE%E5%95%8F%E9%A1%8C%E3%82%92%E8%A7%A3%E6%B1%BA%E3%81%99%E3%82%8B%E3%81%AE%E3%82%92%E6%89%8B%E4%BC%9D%E3%81%A3%E3%81%A6%E3%82%82%E3%82%89%E3%81%88%E3%81%BE%E3%81%99%E3%81%8B%3F%3C%2FP%3E%3CP%3E%E3%82%88%E3%82%8D%E3%81%97%E3%81%8F%E3%80%82%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1997872%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20s32k116%20%E3%83%9C%E3%83%BC%E3%83%89%E4%B8%8A%E3%81%AE%20IAR%20%E3%82%B3%E3%83%B3%E3%83%91%E3%82%A4%E3%83%A9%E3%81%A7%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%A0%E3%82%92%E3%83%95%E3%83%A9%E3%83%83%E3%82%B7%E3%83%A5%E3%81%99%E3%82%8B%E3%81%A8%E3%81%8D%E3%81%AE%E5%95%8F%E9%A1%8C%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1997872%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E8%A7%A3%E6%B1%BA%E7%AD%96%E3%82%92%E3%81%82%E3%82%8A%E3%81%8C%E3%81%A8%E3%81%86!%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1996953%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20s32k116%20%E3%83%9C%E3%83%BC%E3%83%89%E4%B8%8A%E3%81%AE%20IAR%20%E3%82%B3%E3%83%B3%E3%83%91%E3%82%A4%E3%83%A9%E3%81%A7%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%A0%E3%82%92%E3%83%95%E3%83%A9%E3%83%83%E3%82%B7%E3%83%A5%E3%81%99%E3%82%8B%E3%81%A8%E3%81%8D%E3%81%AE%E5%95%8F%E9%A1%8C%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1996953%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EIAR%20Assembler-%26gt%3BPreprocessor-%26gt%3BDefined%E3%82%B7%E3%83%B3%E3%83%9C%E3%83%AB%E3%81%AB%20%3CSTRONG%3ESTART_FROM_FLASH%3C%2FSTRONG%3E%20%E3%82%92%E8%BF%BD%E5%8A%A0%E3%81%97%E3%81%A6%E3%81%8F%E3%81%A0%E3%81%95%E3%81%84%3C%2FP%3E%0A%3CP%3E%E5%89%8D%E3%81%AB%E8%BF%B0%E3%81%B9%E3%81%9F%E3%82%88%E3%81%86%E3%81%AB%E3%80%81%20%3CSTRONG%3ESTART_FROM_FLASH%3C%2FSTRONG%3E%20%E3%82%92%E8%BF%BD%E5%8A%A0%E3%81%97%E3%81%9F%E5%BE%8C%E3%80%81%E9%9B%BB%E6%BA%90%E3%82%92%E5%85%A5%E3%82%8C%E3%81%9F%E5%BE%8C%E3%80%81S32K116EVB%E3%81%AF%E6%AD%A3%E5%B8%B8%E3%81%AB%E5%8B%95%E4%BD%9C%E3%81%A7%E3%81%8D%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22S32DS%20ARM2.2%20to%20IAR%208.32%20S32K116%20START_FROM_FLASH.jpg%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22S32DS%20ARM2.2%20to%20IAR%208.32%20S32K116%20START_FROM_FLASH.jpg%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F311197iE957B8789496AD06%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22S32DS%20ARM2.2%20to%20IAR%208.32%20S32K116%20START_FROM_FLASH.jpg%22%20alt%3D%22S32DS%20ARM2.2%20to%20IAR%208.32%20S32K116%20START_FROM_FLASH.jpg%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E