Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
risc-v-qemu
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Projekt Telematik SS23 QEMU
risc-v-qemu
Commits
01a96326
Commit
01a96326
authored
2 years ago
by
davip00
Browse files
Options
Downloads
Patches
Plain Diff
Add ability to load ESP32-C3 ROM
parent
579d07ad
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
hw/riscv/esp32_c3.c
+7
-4
7 additions, 4 deletions
hw/riscv/esp32_c3.c
with
7 additions
and
4 deletions
hw/riscv/esp32_c3.c
+
7
−
4
View file @
01a96326
...
...
@@ -44,7 +44,7 @@ static const struct MemmapEntry {
};
/* Reset vector according to technical manual page 217 */
static
const
hwaddr
esp32_c3_entry
=
0x40000400
;
//
static const hwaddr esp32_c3_entry = 0x40000400;
/* System I/O memory (TRM p. 91) */
static
const
hwaddr
esp32_c3_sysregs
=
0x600C0000
;
static
const
hwaddr
esp32_c3_sysregs_size
=
4096
;
...
...
@@ -99,9 +99,9 @@ static void esp32_c3_machine_state_init(MachineState *mstate)
esp32_c3_setup_reset_vec
();
if
(
mstate
->
firmware
)
{
//
We don't have any (separate) firmware to load, as this is an MCU
error_report
(
"This board
can't load firmware
"
);
if
(
!
mstate
->
firmware
)
{
//
Firmware is required for most programs, as they call directly into it
error_report
(
"This board
requires a firmware image to run
"
);
exit
(
1
);
}
...
...
@@ -194,6 +194,9 @@ static void esp32_c3_soc_state_realize(DeviceState *dev, Error **errp)
memory_region_add_subregion_overlap
(
&
sss
->
container
,
esp32_c3_clkcfg
,
&
sss
->
clock
,
-
1
);
create_unimplemented_device
(
"riscv.esp32.c.sysregs"
,
esp32_c3_sysregs
,
esp32_c3_sysregs_size
);
/* Load boot ROM dump into emulated ROM */
riscv_load_firmware
(
ms
->
firmware
,
esp32_c3_memmap
[
ESP32_C3_IROM
].
base
,
NULL
);
}
static
void
esp32_c3_soc_class_init
(
ObjectClass
*
klass
,
void
*
data
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment