First, a disclaimer: I'm doing this for fun, not because it made any particular sense.
For background, I've dabbled with embedded systems as a hobby for some time. I've mostly made things that work together with my modular synthesizer setup. Lately I've been working on a one-hand chording keyboard for general text input and ended up writing a small multi-tasking library for it.
While writing that code, I remembered how I've read about the RetroBSD project, where an individual ported 2.11-BSD to the PIC32MX7 family of microcontrollers. I thought about how the PIC32MX7 and the Kinetis-K family aren't that different in concept and capacity, the biggest difference being the processor core architecture, which is MIPS on PIC32MX7 and ARM on Kinetis-K. Turns out that another individual had already ported RetroBSD to STM32F4, which is another Cortex-M based MCU family, very similar to Kinetis-K. Their work is called DiscoBSD, and, well, I had this long weekend which I spent mostly pasting things together from DiscoBSD and Teensyduino init code and writing the missing bits.
It gets this far now:
...and eternal silence falls, as of now. This is the point of first
In case you want to take a look or play with it yourself, it's all here. Another disclaimer: it's a mess, I need to clean up both the tree and the commit history if I ever get this to actually run processes. It should more or less build with the Teensy toolchain. Set
I'll post here if I get any farther.
For background, I've dabbled with embedded systems as a hobby for some time. I've mostly made things that work together with my modular synthesizer setup. Lately I've been working on a one-hand chording keyboard for general text input and ended up writing a small multi-tasking library for it.
While writing that code, I remembered how I've read about the RetroBSD project, where an individual ported 2.11-BSD to the PIC32MX7 family of microcontrollers. I thought about how the PIC32MX7 and the Kinetis-K family aren't that different in concept and capacity, the biggest difference being the processor core architecture, which is MIPS on PIC32MX7 and ARM on Kinetis-K. Turns out that another individual had already ported RetroBSD to STM32F4, which is another Cortex-M based MCU family, very similar to Kinetis-K. Their work is called DiscoBSD, and, well, I had this long weekend which I spent mostly pasting things together from DiscoBSD and Teensyduino init code and writing the missing bits.
It gets this far now:
Code:
20241120 20:15:41 connected to /dev/ttyACM1 press C-z q to exit
DiscoBSD 2.3-current (TEENSY35) #92 561: Wed Nov 20 20:13:48 2024
esp@tieteislaskin:/sys/mk64/teensy35
cpu: MK64FX512, 120 MHz, bus 60 MHz
oscillator: oscillating
usbuart0: USB, console
sd0: port sdio0
sd0: type SDHC, size 7822336 kbytes
sd0a: partition type b7, sector 2, size 204800 kbytes
sd0b: partition type b8, sector 409602, size 2048 kbytes
sd0c: partition type b7, sector 413698, size 204800 kbytes
phys mem = 255 kbytes
user mem = 191 kbytes
root dev = (0,1)
swap dev = (0,2)
root size = 204800 kbytes
swap size = 2048 kbytes
fork()
where one branch becomes swapper
(pid 0) and another becomes init
(pid 1).In case you want to take a look or play with it yourself, it's all here. Another disclaimer: it's a mess, I need to clean up both the tree and the commit history if I ever get this to actually run processes. It should more or less build with the Teensy toolchain. Set
ARM_GCC_PREFIX
to $HOME/.arduino15/packages/teensy/tools/teensy-compile/11.3.1/arm/bin/arm-none-eabi
, then run make MACHINE=mk64 MACHINE_ARCH=arm
to build a ton of things. unix.hex
should appear in sys/mk64/teensy35
and is flashable with the Teensy loader.I'll post here if I get any farther.