Open main menu

DAVE Developer's Wiki β

Changes

BELK-TN-007: FreeRTOS on single-core Bora Lite SoM

2,668 bytes added, 08:42, 28 October 2021
no edit summary
{{InfoBoxTop}}
{{Applies To Bora}}
{{Applies To BoraX}}
{{Applies To BoraLite}}
{{AppliesToBORA Lite TN}}
{{InfoBoxBottom}}
__FORCETOC__
== Introduction ==
In general, Bora Lite SoM is suited for compact, cost-sensitive applications for which [[:Category:Bora|Bora]] or [[:Category:BoraX|BoraX]] would be overkilling. In this scenario, Bora Lite is often equipped with XC7Z007 or XC7Z014 SoC's, which implement single-core processors. In combination with FreeRTOS, such configurations can be the right solution to address applications with real-time constraints as wellapplications not requiring the rich set of features provided by GNU/Linux operating system. This Technical Note (TN) shows describes how to use run a FreeRTOS on Hello, world!-type application a single-core Bora Lite model. TBD
==Testbed==
From the hardware perspective, the testbed is like the one shown [[BELK/BXELK_Quick_Start_Guide#BoraX-BoraXEVB-Lite|here]]. It consists of a BoraXEVB carrier board, a Bora Lite Adapter, and a single-core Bora Lite SoM(equipped with XC7Z007 SoC).
The BoraXEVB carrier board is set up to make the SoM boot from the microSD card.
==Running the application==
There are several ways to run the application on the target. For instance, a JTAG debugging tool can be used. The following is a script in PRACTICE language used to set up a debugging session with [https://www.lauterbach.com/ Lauterbach TRACE32 PowerView]:<syntaxhighlight line="line"pre>
SYStem.CPU ZYNQ-7000CORE0
enddo
</syntaxhighlightpre>  Please note that the FreeRTOS console is routed to the same UART used for the U-Boot console:[[File:BoraLite-FreeRTOS9.png|thumb|center|800px|Debugging session with Lauterbach TRACE32 PowerView]]  Another way to download and run the application is by using the <code>tftpboot</code> and <code>bootelf</code> commands as shown in the following example (*):<pre class="board-terminal">Bora> tftpboot ${loadaddr} boralite/freertos_hello_world.elfUsing ethernet@e000b000 deviceTFTP from server 192.168.0.13; our IP address is 192.168.0.81Filename 'boralite/freertos_hello_world.elf'.Load address: 0x2080000Loading: ################################################################# ######################### 1.4 MiB/sdoneBytes transferred = 457608 (6fb88 hex)Bora> bootelf 0x2080000CACHE: Misaligned operation at range [00100000, 0010e78c]CACHE: Misaligned operation at range [0010e78c, 0010e798]CACHE: Misaligned operation at range [0010e798, 0010e7a4]CACHE: Misaligned operation at range [0010e7a8, 0010ef84]CACHE: Misaligned operation at range [0010ef88, 0010fcbc]CACHE: Misaligned operation at range [0010fcbc, 0010fcc0]CACHE: Misaligned operation at range [00114000, 00114008]CACHE: Misaligned operation at range [00114008, 0011400c]CACHE: Misaligned operation at range [0011400c, 00114010]CACHE: Misaligned operation at range [00114010, 00124554]CACHE: Misaligned operation at range [00124554, 00126560]CACHE: Misaligned operation at range [00126560, 00129d60]## Starting application at 0x00100000 ...Hello from Freertos example mainRx task received string from Tx task: Hello WorldRx task received string from Tx task: Hello WorldRx task received string from Tx task: Hello WorldRx task received string from Tx task: Hello WorldRx task received string from Tx task: Hello WorldRx task received string from Tx task: Hello WorldRx task received string from Tx task: Hello WorldRx task received string from Tx task: Hello WorldRx task received string from Tx task: Hello WorldFreeRTOS Hello World Example PASSED</pre>  (*) It seems that the message ''CACHE: Misaligned operation at range [x, y]'' is [https://forums.xilinx.com/t5/Embedded-Linux/CACHE-Misaligned-operation-at-range-1ffed120-1ffed276/td-p/963278 not a real problem]. ==Related links==*
* [[FileBELK-AN-001:BoraLiteAsymmetric Multiprocessing (AMP) on Bora – Linux FreeRTOS]]* [[BELK-FreeRTOS9.png|thumb|center|800px|captionAN-002: Trace on the Bora AMP (Linux + FreeRTOS) system]]* [[BELK-AN-007: Asymmetric Multiprocessing (AMP) on Bora/BoraX with OpenAMP]]
8,226
edits