Comments (3)
Not bad... I'm impressed!
from baremetal-arm.
It has same issue when testing in ubuntu 20.04 with qemu 4.2.1, but I don't know the reason, however it works after remove "packed" and add "align(4)"
from baremetal-arm.
Good idea to use -d guest_errors
. I think unpacking the structs themselves is a bad idea because they are actually aligned in memory per the datasheet. Adding the alignment in the linker works obviously b/c it forces all data to be aligned on a 4-byte boundary, and because the structs are uint32_t
they end up aligned. A bad compiler though would still be free to put padding in between the uint32_t
, or if they weren't uint32_t
padding would get added.
A better solution I think is to use typedef volatile struct __attribute__((packed, aligned(4)))
which should align the stuct itself and leave it packed.
I tested this on my system with qemu 8.0.2 and gcc 12.2 and it started working.
from baremetal-arm.
Related Issues (14)
- Errata and troubleshooting on ArchLinux HOT 1
- QEMU problem with ALSA on Windows Subsystem for Linux HOT 1
- Wrong bit offset for word length selection HOT 2
- Tutorial #7 fails uart init HOT 1
- Errata Memory Mappings HOT 1
- CMake Build Issue HOT 1
- FDT and ATAGS support not compiled in resetting ... HOT 3
- Chapter 4: arm-none-eabi-ld -T linkscript.ld -o cenv.elf startup.o cstart.o HOT 1
- 04_cenv: data abort bug HOT 2
- Chapter 04: cenv : NOT printing message to UART which is being sent by C code
- U-Boot section: Wrong command? HOT 8
- Note on ndb not being available HOT 2
- Wrong name of the global symbol in LinkerScript part HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from baremetal-arm.