Skip to content

Commit

Permalink
Fix spiFlash type mismatch warning during init (#2809)
Browse files Browse the repository at this point in the history
This PR makes a small change to Host builds, enabling all `debug_x` statements during init/exit.
This highlights one issue, fixed, caused by missing device entry in Rp2040, Host hardware configs:
    
```
[Device] 'spiFlash' type mismatch, 'unknown' in partition table but device reports 'flash'
```
  • Loading branch information
mikee47 authored Jun 18, 2024
1 parent 17db0db commit 69c4294
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
4 changes: 3 additions & 1 deletion Sming/Arch/Host/Components/hostlib/startup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,8 @@ int main(int argc, char* argv[])
}
}

m_setPuts(&host_nputs);

host_debug_i("\nWelcome to the Sming Host emulator\n\n");

auto i = get_first_non_option();
Expand Down Expand Up @@ -309,7 +311,7 @@ int main(int argc, char* argv[])
pause(config.exitpause);

// Avoid issues with debug statements whilst running exit handlers
m_setPuts(nullptr);
m_setPuts(&host_nputs);

return exitCode;
}
7 changes: 6 additions & 1 deletion Sming/Arch/Host/standard.hw
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
"arch": "Host",
"bootloader_size": "0x2000",
"partition_table_offset": "0x2000",
"options": ["4m"],
"devices": {
"spiFlash": {
"type": "flash",
"size": "4M"
}
},
"partitions": {
"rom0": {
"address": "0x008000",
Expand Down
9 changes: 6 additions & 3 deletions Sming/Arch/Rp2040/standard.hw
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@
"arch": "Rp2040",
"bootloader_size": 0,
"partition_table_offset": "self.devices[0].size - 0x1000",
"options": [
"2m"
],
"devices": {
"spiFlash": {
"type": "flash",
"size": "2M"
}
},
"partitions": {
"rom0": {
"address": 0,
Expand Down

0 comments on commit 69c4294

Please sign in to comment.