lowRISC / lowRISC/epic-c-example

Loading flash at address 0x0ABCD000 causes example to hang

Open
#2 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
14
Forks
5
PR merge metrics
No merged PRs in 30d

Description

Applying this patch causes the example to hang:

```diff
diff --git a/kernel.c b/kernel.c
index be748fd..07da912 100644
--- a/kernel.c
+++ b/kernel.c
@@ -18,7 +18,7 @@ int start() {
// (0 - 0x2000) are reserved by spike and the third page contains the
// host-target interface symbols defined in the kernel (0x2000, 0x2008).
uint32_t sram_addr = 0x12340000;
- uint32_t flash_addr = 0x81234000;
+ uint32_t flash_addr = 0x0ABCD000;

const void* elf_data = cm; // App to load.

```

It may just be that this causes two memory regions to overlap but by my calculations there is enough space.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in kernel.c at start(), where sram_addr and flash_addr are assigned, and reproduce the hang with flash_addr set to 0x0ABCD000. Trace the example's memory layout and loading path to determine whether the regions overlap or conflict. Done means the example loads and runs without hanging at that address.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.