Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zephyr RTOS Fails to Boot on NEORV32 SoC (Arty A7-100T) #1109

Open
mohamedElbouazzati opened this issue Nov 29, 2024 · 1 comment
Open

Zephyr RTOS Fails to Boot on NEORV32 SoC (Arty A7-100T) #1109

mohamedElbouazzati opened this issue Nov 29, 2024 · 1 comment
Labels
SW Software-related troubleshooting Something is not working as expected

Comments

@mohamedElbouazzati
Copy link

mohamedElbouazzati commented Nov 29, 2024

Describe the bug

I am running Zephyr RTOS on the NEORV32 SoC implemented on a Digilent Arty A7-100T FPGA board. However, the terminal fails to boot and is stuck at : Booting from 0x00000000
I Have Tried :

  1. Verified the memory mapping between the NEORV32 implementation and the Zephyr device tree; they appear to match.
  2. Increased the instruction memory to 64 KB and data memory to 32 KB, ensuring they align with Zephyr's linker configuration.

Despite these adjustments, the issue persists. Assistance in diagnosing and resolving this boot failure would be greatly appreciated.

To Reproduce

  • Generate bit stream: vivado -mode batch -nojournal -nolog -source create_project.tcl
  • Compile Zephyr for neorv32 : west build -b neorv32 samples/hello_world/ -- -DCMAKE_PROGRAM_PATH=~/neorv32-setups/neorv32/sw/image_gen/
  • use cutecom to send file (neorv32_exe.bin)
    Expected behavior
    A clear and concise description of what you expected to happen.

Screenshots

  • Hello world test :

<< NEORV32 Bootloader >>

BLDV: Jan 21 2023
HWV:  0x01080000
CID:  0x00000000
CLK:  0x05f5e100
ISA:  0x40801104 + 0x00000081
SOC:  0x0007000d
IMEM: 0x00010000 bytes @0x00000000
DMEM: 0x00008000 bytes @0x80000000

Autoboot in 8s. Press any key to abort.
Aborted.

Available CMDs:
h: Help
r: Restart
u: Upload
s: Store to flash
l: Load from flash
x: Boot from flash (XIP)
e: Execute
CMD:> u
Awaiting neorv32_exe.bin... OK
CMD:> e
Booting from 0x00000000...


                                                                                     ##        ##   ##   ##    
##     ##   #########   ########    ########   ##      ##   ########    ########     ##      ################  
####    ##  ##          ##      ##  ##      ##  ##      ##  ##      ##  ##      ##    ##    ####            ####
## ##   ##  ##          ##      ##  ##      ##  ##      ##          ##         ##     ##      ##   ######   ##  
##  ##  ##  #########   ##      ##  #########   ##      ##      #####        ##       ##    ####   ######   ####
##   ## ##  ##          ##      ##  ##    ##     ##    ##           ##     ##         ##      ##   ######   ##  
##    ####  ##          ##      ##  ##     ##     ##  ##    ##      ##   ##           ##    ####            ####
##     ##    #########   ########   ##      ##      ##       ########   ##########    ##      ################  
                                                                                     ##        ##   ##   ##    
Hello world! :)
  • Last version of zephyr and neorv32
BLDV: Oct 31 2024
HWV:  0x01100605
CLK:  0x05f5e100

MISA: 0x40801104
XISA: 0x00000083
SOC:  0x0003800d
IMEM: 0x00010000
DMEM: 0x00008000

Autoboot in 10s. Press any key to abort.
Aborted.

Available CMDs:
 h: Help
 r: Restart
 u: Upload
 s: Store to flash
 l: Load from flash
 x: Boot from flash (XIP)
 e: Execute
CMD:> e
No executable.
CMD:> u
Awaiting neorv32_exe.bin... OK
CMD:> e
Booting from 0x00000000...
  • Zephyr SDk 0.15.2 and neorv32 v1.8.0
BLDV: Jan 21 2023
HWV:  0x01080000
CID:  0x00000000
CLK:  0x05f5e100
ISA:  0x40801104 + 0x00000081
SOC:  0x0007000d
IMEM: 0x00010000 bytes @0x00000000
DMEM: 0x00008000 bytes @0x80000000

Autoboot in 8s. Press any key to abort.
Aborted.

Available CMDs:
 h: Help
 r: Restart
 u: Upload
 s: Store to flash
 l: Load from flash
 x: Boot from flash (XIP)
 e: Execute
CMD:> u
Awaiting neorv32_exe.bin... OK
CMD:> e
Booting from 0x00000000..

Environment:

  • Zephyr OS
  • zephyr-sdk-0.15.2
  • riscv32-unknown-elf-gcc 12.2.0
  • tried also with last zephyr version

Hardware:

  • SoC on vivado folder from neorv32-setups : commit ; 62083bd
  • neorv32 v1.8.0
  • increased memory for d and i on /neorv32/rtl/test_setups/neorv32_test_setup_bootloader.vhd
  • updated provided xdc file from 35 to 100t
  • Tried also with current version of neorv32

Additional context
I followed also github discussion and tested the installation from ReconOS_Zephyr_RISCV
Does NEORV32 still support Zephyr RTOS?

@stnolting
Copy link
Owner

Hey @mohamedElbouazzati!

Hello world test :

This looks good! So the processor seems to operate just fine! 👍

However, the terminal fails to boot and is stuck at : Booting from 0x00000000

That it gets stuck at this point could indicate that there is a problem with the memory configuration (stack too small, insufficient memory size, etc.). Since you've already checked that, I'm a bit helpless now too.

Does NEORV32 still support Zephyr RTOS?

That is a really good question. I still haven't found the time to get to grips with the build system yet, so the current Zephyr "port" still fully depends on repository-external resources.

There we some Zephyr experts here, maybe they can help out?

@stnolting stnolting added SW Software-related troubleshooting Something is not working as expected labels Dec 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SW Software-related troubleshooting Something is not working as expected
Projects
None yet
Development

No branches or pull requests

2 participants