pulp-platform / pulpino

An open-source microcontroller system based on RISC-V
http://www.pulp-platform.org
Other
899 stars 298 forks source link

Illegal Instruction (core 0) at PC 0x00000084 #343

Open Jaina-96 opened 4 years ago

Jaina-96 commented 4 years ago

Hello, I'm using a custom 4k SRAM in replacement to the 32k SRAM, and I get the error as seen below in the ModelSim simulation when executing a simple HelloWorld program. I have updated the ram size in all the RTL files. The link.common.ld file has not been updated as I am not expanding the instruction/data memory. Thanks in advance. Modesim_error_for_helloworldcode

barrydebruin commented 4 years ago

You need to update the riscv.common.ld file to account for the reduced size data memory. The stack will be written to the end of the data memory, which has changed for you.

My best guess is that the hello world string is written to the stack incorrectly, whereafter the printf function tries to load the individual characters from the stack and fails, which leads to this Illegal Instruction error.

nguyendaithien commented 1 year ago

i had the same problem, how did you fix it ?? Thank you