Talk:Raspberry Pi Bare Bones
Love4boobies, I needed to change instances of "asm volatile" to "__asm volaktile" even with "-std=c99". And yes, I did compile and test this before editing the wiki. I'm using arm-none-eabi version 2012.03.56 btw. --Andreasbwagner 16:38, 26 January 2013 (CST)
- It should have been -std=gnu99 (or gnu89 even) -- "c99" effectively enables "-ansi" and so asm is indeed unavailable. I believe that the proper keyword to use here is __asm__, not __asm which works fine, but is described as a "compatibility" one in the GCC docs. Or just enable GNU C extensions and use plain "asm". Alexshpilkin 08:54, 30 August 2013 (CDT)
Issues with toolchain and ABI mentions
Correct me if I'm way off here, but are there a few inaccuracies regarding the ABI in this text?
The article states that:
- "QEMU you do not need to objcopy the kernel into a plain binary; QEMU also supports ELF kernels"
Since we're using the arm-none-eabi toolchain, we're not actually creating ELF executables in the first place. Maybe include some text surrounding what the purpose of using this particular toolchain is, and amend the text about the compiler targeting the System V ABI, isn't the ARM EABI entirely different? Maybe readers might benefit from a minor introductory paragraph to why they're not using ELF in this application.
This line is also redundant:
arm-none-eabi-objcopy myos.elf -O binary myos.bin
As well as the script line for Qemu referencing an incorrectly named file. If there are no objections I'd be happy to make the necessary edits to amend these issues! -- Ajxs 23:27, 3 January 2018 (CST)