RetroBSD: Unix for microcontrollers

RetroBSD is a port of 2.11BSD Unix intended for embedded systems with fixed memory mapping. The current target is Microchip PIC32 microcontroller with 128 kbytes of RAM and 512 kbytes of Flash. PIC32 processor has MIPS M4K architecture, executable data memory and flexible RAM partitioning between user and kernel modes.


Main features

  • Small resource requirements. RetroBSD needs only 128 kbytes of RAM to be up and running user applications.
  • Memory protection. Kernel memory is fully protected from user application using hardware mechanisms.
  • Open functionality. Usually, user application is fixed in Flash memory - but in case of RetroBSD, any number of applications could be placed into SD card, and run as required.
  • Real multitasking. Standard POSIX API is implemented (fork, exec, wait4 etc).
  • Development system on-board. It is possible to have C compiler in the system, and to recompile the user application (or the whole operating system) when needed.

MCU supported of RetroBSD

MIPS M4K architecture with executable data memory and flexible RAM pattition between user and kernel modes.
- RAM 128kbytes
- Flash 512(+12)kbytes
- Fcup 80MHz, 80mips

Reference PIC chips that can be compatible:
  • PIC32MX695F512L (100 pin)
  • PIC32MX795F512L (100 pin)
  • PIC32MX695F512H (64 pin)
  • PIC32MX795F512H (64 pin)

A Mnimalistic System:

- Only One MCU
- SD card X 1
- LEDs x 4
- 3.3V voltage regulator or Battery
- 10 resistors and capacitors
- 8MHz crystal
- Serial communication (RS232) / USB / Bluetooth

If you are interesting to homemade RetroBSD board, you can ebay "PIC32 breakout board".

UBW32 board (schematicsPCBEagle files) was designed by Brian Schmalz, and manufactured by Sparkfun. Latest revision is based onMicrochip PIC32MX795 microcontroller.
Features:
  • PIC32MX795 microcontroller 80 MHz (MIPS architecture)
  • 78 usable i/o pins
  • miniUSB connector, with power supply option
  • footprint for USB-host connector
  • power select switch: from USB or from external source
  • external power connector with diode protection and fuse 500mA
  • 5 LEDs
  • 3 buttons
Memory:
  • 512 kbytes of Flash memory
  • 12 kbytes of additional boot Flash memory
  • 128 kbytes of RAM
Digital outputs can sink or source up to 18 mA. A rich set of peripheral functions is available: UART, SPI, I2C, ADC, timers. Two internal oscillators available: 8 MHz and 32 kHz. Power can be sourced from miniUSB, or from external power supply +7.6 ... 15 VDC.
Buttons:
  • RESET - restart the processor
  • PRG - enter bootloader mode (on RESET)
  • USER - user defined action
LEDs:
  • USB (green) - software controlled, blinks on USB activity
  • LED1 (white) - software controlled
  • LED2 (red) - software controlled
  • LED3 (yellow) - software controlled
  • PWR (blue) - lights when power is supplied



Memory maps


But here have some limits for RetroBSD:

- PIC32MX MIPS only
- 128Kbytes RAM = 32Kb Kernel + 96Kb User
- Max 20 (10) tasks/jobs in timesharing
- Size of the User’s job max 96Kb (code, data, stack)
- 1x Serial UART (up to 6) + 1x Serial via USB
- 1x SD-card (up to 4 SPIs, ~unlimited)
- SWAP on the SDcard ("slow")



Comments

Popular Posts