PC when running Zephyr code

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

PC when running Zephyr code

395 Views
Shruti1
Contributor I
Hello,
 
I am using a Zephyr example that prints "Hello world" on UART1. I added blinking the LED to this code. I can get this running on the MIMXRT1060-EVKB. It uses external SPI flash which is at address 0x60000000. I program this hex file using JTAG and I am monitoring the PC and CycleCnt and they seem to be behaving normally (PC = 60002DEA, CycleCnt = F630B9B9).
I changed the blinking LED to toggling a GPIO (GPIO_AD_B1_03) which is available to probe in both EVKB and our product board configuration, and tested this code on the EVKB.
I am flashing this exact code on our new board. The new board also has an external SPI flash at address 0x60000000. I am programming it exactly the same way as the EVKB. When I look at the PC, the CycleCnt is actually running but the PC is off (PC = 0020ED48, CycleCnt = 9661031E) and hence the code does not do anything.

I have also tried flashing a circuit python hex to this new board and a regular bare-metal example. The flashing works and when I halt the MCU, the PC values seem like what it should be (PC = 60007E36, CycleCnt = DFDEC1A7). Using circuit python I am able to toggle GPIO_AD_B1_03, so I know it is not grounded.
 
When looking at JLinkFlashLite API, the circuitpython code is as follows:
Selected file: circuitpython_p1_0809.hex
Data file contains 3 memory ranges:
  #0: 0x60000000 - 0x600001FF (512 Bytes)
  #1: 0x60001000 - 0x6000102F (48 Bytes)
  #2: 0x6000C000 - 0x6009958F (578960 Bytes)
 
The bare-metal example looks like:
Selected file: enet_txrx_transfer.hex
Data file contains 3 memory ranges:
  #0: 0x60000000 - 0x600001FF (512 Bytes)
  #1: 0x60001000 - 0x6000102F (48 Bytes)
  #2: 0x60002000 - 0x6000B69F (38560 Bytes)
 
And the firmware file from PIO looks like:
Selected file: /home/shruti/Downloads/zephyr-get-started/firmware.hex
Data file contains 1 memory range:
  #0: 0x60000000 - 0x60007C49 (31818 Bytes)

Any ideas what could potentially be happening? Again, I can run the code just fine on the EVKB board. Is there an extra configuration I have to do on a chip that is not on an evaluation board?
0 Kudos
2 Replies

335 Views
Shruti1
Contributor I

Just an update in case someone else gets this error. Turns out Zephyr defaults to using external RAM which is available on the dev kit. Since we did not have an external RAM on our own board, the code would fail.

0 Kudos

372 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

You might check with Zephyr community:

https://docs.zephyrproject.org/latest/samples/index.html

 

Regards

0 Kudos