OpenCores
no use no use 1/1 no use no use
Does FreeRTOS handle MMU & Cache on OR1200
by avamsi on Apr 26, 2012
avamsi
Posts: 54
Joined: Apr 16, 2012
Last seen: Jul 30, 2014
Hi,

I downloaded FreeRTOS OS. But I found no source related to MMU,cache and interrupts for OR1200 port. Our applications needs both MMU(I & D) and cache(I & D). We have to handle interrupts also. Please clarify that if the FreeRTOS can handle MMU,caches and interrupts. Where can I get that patches for full RTOS implementation which can serve our requirement. In our requirement,the OS should boot from flash and the kernel should handle MMUs, caches,interrupts,GPIOs and Queues.

Thanks,
A.Vamsi
RE: Does FreeRTOS handle MMU & Cache on OR1200
by filepang on Apr 27, 2012
filepang
Posts: 23
Joined: Jul 2, 2009
Last seen: May 6, 2016
Hi, avamsi.

FreeRTOS use timer interrupt in kernel it self. Interrupt related code resides in FreeRTOSV6.1.1/Demo/OpenRISC_SIM_GCC/arch/interrupts.c. In a demo application, UART driver use TX, RX interrupts and IPC (Inter-process Queue). It can be a good example. refer the FreeRTOSV6.1.1/Demo/OpenRISC_SIM_GCC/serial/serial.c

FreeRTOS kernel does not support MMU feature in officially. and, FreeRTOS does not support any boot procedure. It's a user responsibility. many other rtos are similar. U-boot port for OpenRISC may be helpful.

In a demo application, there is no peripheral controller which use DMA feature. so, cache management codes are not prepared. I/D cache enable code in resided in FreeRTOSV6.1.1/Demo/OpenRISC_SIM_GCC/arch/reset.S, but not used. If you are need cache management code(something like a flushing, line invalidate...etc), i can upload it in a few days later.

Thanks.



RE: Does FreeRTOS handle MMU & Cache on OR1200
by avamsi on May 1, 2012
avamsi
Posts: 54
Joined: Apr 16, 2012
Last seen: Jul 30, 2014
Hi filepang,

Thank you for your kind reply.It's pleasure to get to know more from you on this OR1200.

We decided to disable the MMU part of OR1200. But cache related activities like cache flushing, invalidating,enable and disable are still required. Performance is crucial thing as it should run multiple algorithms. Please let us know when you are done with the uploading of those cache related files and please locate the link to download from there.
One more activity to address is boot loader thing. In our application,the FreeRTOS should boot from some NAND flash and the firmware updation must be flexible. Please clarify if U-boot can boot this FreeRTOS and firm updation is easy or any feasible and already working method for boot options possible.

Thank in advance,
A.Vamsi
RE: Does FreeRTOS handle MMU & Cache on OR1200
by stekern on May 2, 2012
stekern
Posts: 84
Joined: Apr 28, 2009
Last seen: Nov 10, 2016
U-boot can boot FreeRTOS from nand, no problem.
There is a but though, you will need a NAND driver for
your NAND controller.
Which NAND controller are you planning to use?

For more information on how to use U-Boot, get acquainted with:
http://opencores.org/or1k/U-boot
and
http://www.rte.se/blog/blogg-modesty-corex/using-u-boot
RE: Does FreeRTOS handle MMU & Cache on OR1200
by filepang on May 10, 2012
filepang
Posts: 23
Joined: Jul 2, 2009
Last seen: May 6, 2016
hi, avamsi.

I was updates to FreeRTOS for a cache supports. a newer source code is available from the oc svn. dcache management example can be found in Demo/OpenRISC_SIM_GCC/dma/or32_dma.c. and the cache related functions are reside in Demo/OpenRISC_SIM_GCC/arch/cache.c.

i hope this will be helpful for you.

Thanks,
filepang.
RE: Does FreeRTOS handle MMU & Cache on OR1200
by avamsi on Jun 19, 2012
avamsi
Posts: 54
Joined: Apr 16, 2012
Last seen: Jul 30, 2014
Hi Filepang,

I could run the FreeRTOS multi-tasking examples on the OR1200 HW. But when I tried to use the standard c functions like printf, scanf, melloc, it is giving following linker errors.

/home/avamsi/OpenRISC/binaries/openrisc/or32-elf/lib/libc.a(lib_a-sbrkr.o): In function `_sbrk_r':
/home/avamsi/OpenRISC/gnu-src/bd-elf/or32 elf/newlib/libc/reent/../../../../../unisrc/newlib/libc/reent/sbrkr.c:60: undefined reference to `_sbrk'
/home/avamsi/OpenRISC/binaries/openrisc/or32-elf/lib/libc.a(lib_a-writer.o): In function `_write_r':
/home/avamsi/OpenRISC/gnu-src/bd-elf/or32-elf/newlib/libc/reent/../../../../../unisrc/newlib/libc/reent/writer.c:58: undefined reference to `_write'
/home/avamsi/OpenRISC/binaries/openrisc/or32-elf/lib/libc.a(lib_a-closer.o): In function `_close_r':
/home/avamsi/OpenRISC/gnu-src/bd-elf/or32-elf/newlib/libc/reent/../../../../../unisrc/newlib/libc/reent/closer.c:53: undefined reference to `_close'
/home/avamsi/OpenRISC/binaries/openrisc/or32-elf/lib/libc.a(lib_a-fstatr.o): In function `_fstat_r':
/home/avamsi/OpenRISC/gnu-src/bd-elf/or32-elf/newlib/libc/reent/../../../../../unisrc/newlib/libc/reent/fstatr.c:62: undefined reference to `_fstat'
/home/avamsi/OpenRISC/binaries/openrisc/or32-elf/lib/libc.a(lib_a-isattyr.o): In function `_isatty_r':
/home/avamsi/OpenRISC/gnu-src/bd-elf/or32-elf/newlib/libc/reent/../../../../../unisrc/newlib/libc/reent/isattyr.c:58: undefined reference to `_isatty'
/home/avamsi/OpenRISC/binaries/openrisc/or32-elf/lib/libc.a(lib_a-lseekr.o): In function `_lseek_r':
/home/avamsi/OpenRISC/gnu-src/bd-elf/or32-elf/newlib/libc/reent/../../../../../unisrc/newlib/libc/reent/lseekr.c:58: undefined reference to `_lseek'
/home/avamsi/OpenRISC/binaries/openrisc/or32-elf/lib/libc.a(lib_a-readr.o): In function `_read_r':
/home/avamsi/OpenRISC/gnu-src/bd-elf/or32-elf/newlib/libc/reent/../../../../../unisrc/newlib/libc/reent/readr.c:58: undefined reference to `_read'
make: *** [rtosdemo.or32] Error 1
avamsi@avamsi01:~/OpenRISC/FreeRTOS/freertos-openrisc/FreeRTOSV6.1.1/Demo/OpenRISC_SIM_GCC$

I am using the same Make file that is provided in the FreeRTOS code. Actually the above functions which are shown as undefined references are defined in the Libgloss(newlib-1.18.0/libgloss/or32/*.c) directory in the Newlib toolchain and those are called in newlib/libc/reent/*.c files. Do I have to provide any other libraries options to make it work. Please suggest any options that are needed to mention make file.

Thanks in advance,
A.Vamsi
no use no use 1/1 no use no use
© copyright 1999-2026 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.