The operating system
- kexit() or call to _exit() syscall ?
- Disable interrupts in exit function
- Disable fiq, enable irq.
- Check flags values for processor modes in the doc.
- Check flags values for irq and fiq in the doc.
- Stack implementation: FA, FD, EA, ED? Currently ED.
- Init stacks for all modes. Stack sizes in boot.s must match the linker script.
- Clear .bss section.
- Call main function: do not use branch. Address may be out of range.
- Linker script.
- Prefetch abort and data abort modes differences?
- Branch prediction p59 Cortex Guide.
- Interruption table.
- Svc call.
- Svc handler
- Abort handler
- Undefined instruction handler
- Irq handler
- Fiq handler: print message.
Value | r0 Code | r1 | r2 | return (r0) |
---|---|---|---|---|
error | 0x00000 | Error number | Undefined | 0 if success, else 1 |
UART_putc | 0x00100 | the char to push | Null | 0 if success, else 1 |
minit | 0x00200 | process heap_start adress | Null | 0 if success, else 1 |
kmalloc | 0x00201 | process heap_start adress | Null | adress of memory block |
- File system (must code diskio.c)
- uart_init(): causes crashes
- Mettre uart_strLen dans un fichier util
- Séparer les fichiers du syscalls.c
- Operational mode configuration necesssary?
- uart_write_byte(): is UART_LSR_TX_SR_E necessary?
- uart_write_byte(): alternate version using diferrent register?
- uart_read_byte(): alternate version for signed values?
Create a file "makesrc" in the directory of the source(s) file(s) and add the name of the sources inside.
The script will automaticaly reconize the files and compile them.
Bugs for asm source files.
- fichier tempo en C
- Compilation: use arm instruction (-marm option in gcc)
- Difference .code 32 and .arm: none.
./configure --target=arm-none-eabi --enable-interwork --enable-multilib --with-gnu-as --with-gnu-ld --disable-shared --disable-libssp --disable-libada --disable-newlib-supplied-syscalls --enable-lite-exit --disable-newlib-multithread
sources : https://gcc.gnu.org/ml/gcc-help/2012-08/msg00190.html ./configure --target=arm-none-eabi --enable-interwork --enable-multilib --with-newlib --disable-nls --disable-shared --disable-threads --with-gnu-ld --with-gnu-as --disable-libssp --disable-libmudflap --disable-libgomp --with-dwarf2 -v --disable-werror --with-cpu=cortex-a8 --with-mode=thumb --enable-target-optspace --with-fpu=fpv4-sp-d16 --with-float=soft --enable-languages=c,c++ --disable-newlib-multithread