Search found 6 matches
- Mon Dec 16, 2019 5:30 pm
- Forum: Bare metal, Assembly language
- Topic: Circle - C++ bare metal environment (with USB)
- Replies: 317
- Views: 98721
Re: Circle - C++ bare metal environment (with USB)
Is there some way I could educate myself on C++ on bare metal? Many language features come without manual work — ctors/dtors are called automatically for variables on function entry/exit and new/delete, templates are expanded into plain functions etc. The major parts differing from C care are globa...
- Thu Dec 12, 2019 4:39 pm
- Forum: Bare metal, Assembly language
- Topic: ARM ASM && printf
- Replies: 13
- Views: 1396
Re: ARM ASM && printf
I just know it ran and gave the correct output so I was happy enough with that. Do you mean the executable produced by the GCC command actually runs, but is not recognized by ldd? If this is the case then try adding -dynamic-linker /lib/ld-linux-armhf.so.3 to the LD command (I have no access to Ras...
- Wed Dec 11, 2019 9:42 am
- Forum: Bare metal, Assembly language
- Topic: ARM ASM && printf
- Replies: 13
- Views: 1396
Re: ARM ASM && printf
Is there a way to fix that? I see you passing -lc to LD and succeeding, does anything else still go wrong? Also did you manage solve the "not a dynamic executable" issue? It would be nice if you can leave an explanation to help potential future viewers. I've never used Thumb code and was ...
- Wed Dec 11, 2019 4:33 am
- Forum: Bare metal, Assembly language
- Topic: ARM ASM && printf
- Replies: 13
- Views: 1396
Re: ARM ASM && printf
The most important reason why "B LR" does not work is, as is mentioned before, that B takes an immediate value (B <label> or B <address>) and not a register. BX LR checks the least significant bit of LR and if it's 0, jumps to LR and treat binary data there as Arm instructions if it's 1, j...
- Wed Dec 11, 2019 3:32 am
- Forum: Bare metal, Assembly language
- Topic: ARM ASM && printf
- Replies: 13
- Views: 1396
Re: ARM ASM && printf
The definition (implementation) of printf() is in the C standard library, so you need to link it in by passing -lc to LD. The last branch instruction should be written "BX LR", since B takes an immediate value and not a register and the assembler thus interprets "LR" there as an ...
- Mon Dec 09, 2019 8:13 am
- Forum: Bare metal, Assembly language
- Topic: Introducing AMPi — a bare metal HDMI audio driver in C
- Replies: 1
- Views: 784
Introducing AMPi — a bare metal HDMI audio driver in C
Hi all! I would like to introduce you to AMPi , a semi-standalone driver for HDMI audio output. It is ported from Circle and adpoted from C++ to C. AMPi requires that the environment provides a fixed set of functions (memory allocation, timer, interrupt handler, mailbox, and logging — many of these ...