1 # CORTEX M3 FROM SCRATCH
3 This is my little 'Cortex M3 from scratch' project. No external libraries
4 or IDEs are used. Everything is written from scratch. My development environment
5 consist of nothing more than:
7 * GCC-arm-none (standard ARM cross compiler)
11 The board I use is a cheap Chinese STM32F103 ripoff. In theory, you should be able to
12 port this code to any Cortex M0/M3/M4/M7 board.
15 * Setup bare development environment [COMPLETED] -- FILES: Makefile, link.d
16 * Boot and jump to C [COMPLETED] -- FILES: start.asm, main.c, include/sys/mmap.h, include/sys/robsys.h
17 * Interrupt Handling [COMPLETED] -- FILES: ivt.c, lib/string.c
18 * Basic input and output (UART) [COMPLETED] -- FILES: driver/uart.c, lib/stdio.c
19 * SysTick [COMPLETED] -- FILE: systick.c
20 * System Info [COMPLETED] -- FILE: sysinfo.c
21 * High Speed External Clock / tuning [COMPLETED] -- FILE: clock.c
22 * RTC (Real Time Clock) [COMPLETED] -- FILE: rtc.c
23 * Built-in-shell [COMPLETED] -- FILE: term.c
24 * Port printf/libc library [COMPLETED] -- FILE: lib/tinyprintf.c
26 * EEPROM: drivers/at24c.c [COMPLETED]
27 * UART drivers/uart.c [COMPLETED]
28 * LED segment display: drivers/tm1637.c [COMPLETED]
29 * Temperature sensor: drivers/tsensor.c [COMPLETED]
30 * OLED display [PLANNED]
31 * Joystick: drivers/mk450_joystick.c [COMPLETED]
32 * TFT Screen: drivers/st7735s.c, include/libs/fonts/wogfont.h [COMPLETED]
33 * Memory Management [IN PROGRESS] -- FILE: lib/pool.c
34 * Kernel heap [COMPLETED] -- FILE: heap.c
35 * User Mode Switch [IN PROGRESS]
36 * System Calls [IN PROGRESS] -- FILE: syscall.c lib/syscall.c
37 * Scheduler based on PendSV system call [IN PROGRESS]
38 * Stack trace debug [IN PROGRESS]
39 * Memory Protection Unit [SUSPENDED] (STM32F103 board has no MPU)
40 * Loadable programs from EEPROM [PLANNED]
41 * Multiple processes [IN PROGRESS] -- FILES: process.h, main.c
42 * Driver "abstraction" [PLANNED]
45 Here are some screenshots that shows the terminal just after booting:
49 ![Screenshot](https://github.com/robinkrens/cortex-from-scratch/raw/master/img/serial.png "serial terminal screenshot")
51 TFT screen output (SPI):
53 ![Screenshot](https://github.com/robinkrens/cortex-from-scratch/raw/master/img/tft.png "tft peripheral screenshot")