Run hello_world example on M4 core

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

Run hello_world example on M4 core

398 Views
Ferromagnetic
Contributor II

Hi all

I have IMX8QXP board and want to run example from MCUXpresso SKD version 2.9.0. I boot my device from eMMC. 

I tried to run hello_world example (...\SDK\MIMX8QX\SDK_2_9_0_MEK-MIMX8QX\boards\mekmimx8qx\demo_apps\hello_world\armgcc\debug\hello_world.elf).

I use Segger JLink Base as a debugger and use ARM GCC with arm-none-eabi-gdb debugger. Also I patched JLink with patch from NXP site iar_segger_support_patch_imx8qx (JLink.zip inside).

I follow steps:

1. Open Segger J-Link GDB Server, choose USB, target device MIMX8QX6_M4, JTAG and click OK

2. JLink is connected, device MIMX8qx6_M4 is halted, waiting for GDB connection

3. Inside \SDK\MIMX8QX\SDK_2_9_0_MEK-MIMX8QX\boards\mekmimx8qx\demo_apps\hello_world\armgcc\debug\ folder run command line and type 'arm-none-eabi-gdb.exe .\hello_world.elf'

4. In (gdb) console type 'target remote localhost:2331" and then GDB client is connected in GDB server

console output: 0x0000025e in ?? ()

5. Type monitor reset and in server reset is performed 

Read 4 bytes @ address 0x0000025E (Data = 0xE7FEE7FE)
Read 2 bytes @ address 0x0000025E (Data = 0xE7FE)
Received monitor command: reset

6. Type monitor halt and nothing happen (because already halted probably...)

7. Type load

console output:

Loading section .interrupts, size 0xa00 lma 0x1ffe0000 Loading section .resource_table, size 0x10 lma 0x1ffe0a00 Loading section .text, size 0x2fe8 lma 0x1ffe0a10 Loading section .ARM, size 0x8 lma 0x1ffe39f8 Loading section .init_array, size 0x4 lma 0x1ffe3a00 Loading section .fini_array, size 0x4 lma 0x1ffe3a04 Loading section .data, size 0x68 lma 0x1ffe3a08 Start address 0x1ffe0acc, load size 14960 Transfer rate: 38 KB/sec, 2137 bytes/write.

GDB server log: 

Downloading 2560 bytes @ address 0x1FFE0000 - Verified OK
Downloading 16 bytes @ address 0x1FFE0A00 - Verified OK
Downloading 12264 bytes @ address 0x1FFE0A10 - Verified OK
Downloading 8 bytes @ address 0x1FFE39F8 - Verified OK
Downloading 4 bytes @ address 0x1FFE3A00 - Verified OK
Downloading 4 bytes @ address 0x1FFE3A04 - Verified OK
Downloading 104 bytes @ address 0x1FFE3A08 - Verified OK

8. Monitor go

in GDB log:

Writing register (PC = 0x1ffe0acc)
Received monitor command: go
Starting target CPU...

And nothing happen, no output on M4 console (using Putty first uart channel have A35 console, second should be z M4 console). I tried also load bin file from sd card using u-boot console (fatload mmc 1:1 0x88000000 hello_world.bin; dcache flush; bootaux 0x88000000 0) but then program seems to stating but hello world is printed out on the A35 core console. It looks like something wrong with console settings in the hello_world example. I installed drivers for FTDI chip, and also trying on console on Linux host and the same behavior.

I also wondering if cortex M4 core can be developed standalone without A35 linux running.

[EDIT]

I flash another examples via JLink and the debug output appear on third console channel (not second like was written in instruction). With hello_world example is apparently something wrong with console setup in code.

0 Kudos
Reply
0 Replies