QN9090DK6 Blinky fails on devkit

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

QN9090DK6 Blinky fails on devkit

856 Views
arpad_toth
Contributor II

Generating blinky via

  • MCUX_SDK_2_6_12
  • MCUX_CFG_v14

 


Errors out of the box:

led_blinky.out
.postbuild
FAILED: C:/sandboxes/nxpexample/beacon9090_sdk265_blinky3/led_blinky/debug/.postbuild
cmd /C cd C:\sandboxes\nxpexample\beacon9090_sdk265_blinky3\led_blinky && C:\sandboxes\nxpexample\beacon9090_sdk265_blinky3\led_blinky/dk6_iarpostbuild.bat C:\sandboxes\nxpexample\beacon9090_sdk265_blinky3\led_blinky\debug\led_blinky.out 294912 && echo > "C:\sandboxes\nxpexample\beacon9090_sdk265_blinky3\led_blinky\debug/.postbuild"
C:\sandboxes\nxpexample\beacon9090_sdk265_blinky3\led_blinky>set script_path=C:\sandboxes\nxpexample\beacon9090_sdk265_blinky3\led_blinky/dk6_iarpostbuild.bat
C:\sandboxes\nxpexample\beacon9090_sdk265_blinky3\led_blinky>set file=C:\sandboxes\nxpexample\beacon9090_sdk265_blinky3\led_blinky\debug\led_blinky.out
C:\sandboxes\nxpexample\beacon9090_sdk265_blinky3\led_blinky>set stated_size=294912
C:\sandboxes\nxpexample\beacon9090_sdk265_blinky3\led_blinky>set app_id=
C:\sandboxes\nxpexample\beacon9090_sdk265_blinky3\led_blinky>set python_script=C:\sandboxes\nxpexample\beacon9090_sdk265_blinky3\led_blinky/dk6_image_tool.py
C:\sandboxes\nxpexample\beacon9090_sdk265_blinky3\led_blinky>if "294912" == "" (py -3 C:\sandboxes\nxpexample\beacon9090_sdk265_blinky3\led_blinky/dk6_image_tool.py C:\sandboxes\nxpexample\beacon9090_sdk265_blinky3\led_blinky\debug\led_blinky.out ) else (if "" == "" (py -3 C:\sandboxes\nxpexample\beacon9090_sdk265_blinky3\led_blinky/dk6_image_tool.py -s 294912 C:\sandboxes\nxpexample\beacon9090_sdk265_blinky3\led_blinky\debug\led_blinky.out ) else (py -3 C:\sandboxes\nxpexample\beacon9090_sdk265_blinky3\led_blinky/dk6_image_tool.py -s 294912 -i C:\sandboxes\nxpexample\beacon9090_sdk265_blinky3\led_blinky\debug\led_blinky.out ) )
Unable to create process using 'C:\Python312\python.exe C:\sandboxes\nxpexample\beacon9090_sdk265_blinky3\led_blinky/dk6_image_tool.py -s 294912 C:\sandboxes\nxpexample\beacon9090_sdk265_blinky3\led_blinky\debug\led_blinky.out': The system cannot find the file specified.
C:\sandboxes\nxpexample\beacon9090_sdk265_blinky3\led_blinky>arm-none-eabi-objcopy -O binary C:\sandboxes\nxpexample\beacon9090_sdk265_blinky3\led_blinky\debug\led_blinky.out C:\sandboxes\nxpexample\beacon9090_sdk265_blinky3\led_blinky\debug\led_blinky.out.bin
'arm-none-eabi-objcopy' is not recognized as an internal or external command,
operable program or batch file.
Total number of errors: 1
Total number of warnings: 0
Resolving dependencies...
Build failed

After removing post Build action it compiles.

But doesn't get to main in IAR 9.2

It's just wonders around in:

arpad_toth_0-1698936091406.png

Why is that?

 

In IAR 8.2:

Linking
Performing Post-Build Action
Error while running C:\sandboxes\nxpexample\beacon9090_sdk265_blinky4\led_blinky4/dk6_iarpostbuild.bat C:\sandboxes\nxpexample\beacon9090_sdk265_blinky4\led_blinky4\debug\led_blinky4.out 294912 

After removing post build it compiles.

It finally gets to main

but debugging dies in

BOARD_BootClockRUN();

     -> CLOCK_AttachClk(kFRO12M_to_MAIN_CLK);

If I step on Disassembly view then it gets over it.

 

I have 32Mhz selected in GUI

arpad_toth_1-1698936314681.png

Same issue with two devkits. And this is only a blinky.

arpad_toth_3-1698937924477.png

 

I'm using Jlink Plus debugger, never had problems with it on STM32.

 

I'm attaching the project, please fix it.

 

Labels (1)
0 Kudos
9 Replies

814 Views
Gavin_Jia
NXP TechSupport
NXP TechSupport

Hi @arpad_toth ,

Hope you are doing well!

MCUXpresso SDK Builder provided a IAR toolchain option for QN9090DK6. Would you please have a try with it?

Gavin_Jia_0-1699250420703.png

 

Best regards,

Gavin

 

0 Kudos

808 Views
arpad_toth
Contributor II

Hello,

I always have IAR version selected,

I tried the latest version

arpad_toth_0-1699264362253.png

and generated a blinky again from it, ran it on IAR 8.32.1, and it doesn't even stop at main( )

I just wonders around at:

arpad_toth_1-1699264442571.png

 

Does the previous example I attached  work for you?

 

 

 

0 Kudos

765 Views
Gavin_Jia
NXP TechSupport
NXP TechSupport

Hi @arpad_toth ,

Thanks for the information.

We believe that there is a misunderstanding on the SDK and Config Tool.

On the web MCUXpress SDK Builder, we can find some boards' SDKs support different IDE Tool Chains, such as MCUXpresso IDE, IAR, and Keil.

If it meet our requirements, we can just build and download the corresponding one. Then we can use it directly in IDE with out Config Tool converting. But if you want to use IAR while the SDK Builder only provided MCUXpresso IDE version, and in this scenario, we can then use the Config Tool to make the conversion. (SDK MCUXpresso to SDK IAR)

For your use case, there is no need to use the config tool again for conversion.

I tried on my side with the  IAR Version SDK directly, it works well. And also, I downloaded a MCUXpresso Version SDK and converted with Config Tool to IAR Version SDK, it is ok. 

I attached my screen here for your reference:

iar_build_succeeded.png

iar_message.png

 

Best regards,

Gavin

0 Kudos

761 Views
arpad_toth
Contributor II

Hello,

There is no misunderstanding, I selected IAR for SDK, set clock to 32Mhz, generated a blinky from it.

I see the IAR files in it,

IAR doesn't seem to find the main function unless I step it in assembly.

Even if I program it and let it go it does not blink the LED on board.

 

I recorded the entire process: https://youtu.be/t9puSxciXv8

I'm attaching the generated project, could you try to run this? Do you see the LED blinking?

Still no LED when I don't select 32Mhz clock and use default config.

 

BTW post action fails because I don't have arm-none-eabi-objcopy installed, only IAR, but post action is not essential.

If I turn optimalization from Low to None then it finds main().
But still gets stuck at
BOARD_BootClockRUN()::CLOCK_AttachClk(kFRO12M_to_MAIN_CLK);

so still no blinking.

 

I think there is a problem with startup code or HAL maybe.

At least please attach your working blinky example so I can try on devboard with IAR.

0 Kudos

744 Views
Gavin_Jia
NXP TechSupport
NXP TechSupport

Hi @arpad_toth ,

Hope you are doing well!

I followed your video but it still works well. I attached my IAR project file here (after modifying the clock with Config Tools). My IAR version is 9.32.1.

In your side,  it can't execute make successfully without any modification? By any chance would you please try to select all components while building the SDK? 

Really sorry as judging from the steps in the video it should be ok but not... 

 

Gavin

0 Kudos

739 Views
arpad_toth
Contributor II

Interesting

Your project in IAR 9.40.2

Fails the same way with Jlink, it wonders around instead of break on main()

arpad_toth_1-1699526049759.png

BUT it stops correctly at main with CMSIS DAP!

Although it still has verification error:

arpad_toth_2-1699527952103.png

AND only stops at 2nd attempt of running after programming.

    (first time it seems to wonder in RAM, not in flash!)

And after that I let it go and see blinking!

 

Very weird, please see the video

https://youtu.be/iOjWRgYwe8E

 

My Blinky fails with both JLINK, and CMSIS DAP debugger.

But all files are the same! (so SDK is the same)

 

 

Side note, Post build still fails in yours:

arpad_toth_0-1699525807419.png

I do have python in PATH.

But IAR can generate .bin/.hex outputs, so no post build is needed, especially for blinky.

 

 

So questions

why it fails with JLINK on mine? (I have jlink v7.92 latest, no problem with QN9080/STM32s)

are you using JLINK?

why the verification error with CMSIS DAP?

Why it only works for the second time?

Could you do the same process on a fresh PC?

 

with IAR 8.x if possible

with these settings:

arpad_toth_3-1699528844207.png

arpad_toth_4-1699528851867.png

you shouldn't get a verification error,

it should stop at main on first attempt,

and it should blink after you let it go.

 

It was far easier with QN9080 to get started.

If we could solve this in 1week that would be great, we are behind schedule.

Thank you!

 

UPDATE:

setting this to zero turned my blinky into your blinky, thus fails the same way

<name>TrustZoneModes</name>
<state>0</state>

In led_blinkyv8.ewp

Please update your SDK templates with this.

 

 

 

0 Kudos

735 Views
arpad_toth
Contributor II

I think it has to do with post build step,

it patches the elf file to make it work with IAR, and might do something with TrustZone

it requires python2.7 and arm gcc, which I won't install .

QN9080 worked without post build action together with JLINK.

 

Could you get it working with IAR without post build step?

 

Tags (1)
0 Kudos

728 Views
Gavin_Jia
NXP TechSupport
NXP TechSupport

Hi @arpad_toth ,

You can have a look at dk6_iarpostbuild.bat.

This bat file will call python script and arm-none-eabi-objcopy. The build process is not complete without them. A complete tool chain is necessary, at least for QN9090. Even if change to using MCUXpresso IDE, these two tools are still a must.

 

Best regards,

Gavin

0 Kudos

719 Views
arpad_toth
Contributor II
Understood, although this is a disadvantage compared to other products/brands.

Please try to avoid extra steps in new products, or sort it out with IAR.

Thank you for the support!
0 Kudos