Porting FreeRTOS to the OpenRISC 1200
About
This page is about creating a port of the
FreeRTOS real time kernel to the
OpenRISC 1200 processor.
Tools:
- OpenRISC 1000 (OR32) Architectural Simulator, version 0.2.0
- or32-uclinux-gcc (GCC) 3.4.4
Status
- Tick timer
- Scheduler
- Creating and deleting tasks
- Suspending and resuming tasks
- IPC with Queues
To do
- Make Demo apps work
- Clean up code
Download
FreeRTOS_OpenRISC.patch: patch against FreeRTOS V4.1.3
unzip FreeRTOSV4.1.3.zip
patch -p0 < FreeRTOS_OpenRISC.patch
cd FreeRTOS/Demo/OpenRISC_GCC
make
Debugging
With
simulator only:
-
or32-uclinux-sim -i freertos.or32
With
ddd/gdb/simulator:
-
or32-uclinux_sim -i, give stall cmd
-
ddd --debugger or32-uclinux-gdb
-
file "freertos.or32" load code into debugger
-
target jtag jtag://localhost:9999 (depending on the specified port in sim.cfg) connect to simulator
-
load freertos.or32 load code into simulator
-
set $pc=_reset set program counter to reset vector
-
b main set breakpoint to main()
-
run
All commands can be combined in a file, e.g. ddd.cmd. Start ddd with
ddd --debugger or32-uclinux-gdb --command=ddd.cmd.
If you get something like "Unable to set flags for gdb socket..." startup the simulator in interactive mode, give the "target jtag..." command in gdb and enter "stall" in the simulator. Seems to be a bug in the simulator. This is fixed in latest CVS.
Development
%A% All development related issues can be found in
PortingFreeRTOStoOpenRISCdev.
(old altera pci-x development board making up as a nice fpga environment for the
OpenRISC)
--
MatthiasWientapper - 17 Apr 2006