Compiling

Compiling Mecrisp-Stellaris is easy, just enter your MCU directory and type make.

  • You’ll need none-arm-eabi installed, which is available for FreeBSD and Linux at least.

Kernel Patches

Testing A Patch Before Applying

patch –dry-run < myfile.patch

Applying patches

patch < myfile.patch

Reversing Patches

patch -R < myfile.patch

Patch: Simpler Stack Printer

Reason: While some write new Words to modify the default Stack printer ”.s”, I prefer to patch the assembly source code.
From :         Stack: [7 ] 42 1 2 3 4 5 6  TOS: 7  *>
To:            .s [7 ] 42 1 2 3 4 5 6 7  ok.

STM32F0

Patch: Move Terminal From USART1 to USART2

Reason: To provide a byte of eleven consecutive bits, PA-4 to PA-15.
  • USART 1 is the default
  • Both USART1 and USART2 are enabled with SF1 which is also default
Board MCU Comms Type TX RX
STM32F0 Discovery STM32F051R8 USART1 PA9 PA10
or        
STM32F0 Discovery STM32F051R8 USART2 PA2 PA3

Patch: Add RTS Handshaking To USART1

Reason, so the MCU UART can tell the terminal to stop sending as required. Note this won’t fix the Mecrisp-Stellaris compiler receiving Words too fast with the resultant freeze. A terminal that handles flow control via ‘OK’ processing such as e4thcom is still required for maximum performance and minimum delay.

Patch: Add RTS Handshaking at 460800 Baud To USART1

Reason: Because at 460800 Baud you’ll need RTS handshaking!