element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Avnet Boards Forums
  • Products
  • Dev Tools
  • Avnet Boards Community
  • Avnet Boards Forums
  • More
  • Cancel
Avnet Boards Forums
Software Application Development Zedboard AMP petalinux-freeRTOS; rtos firmware running?
  • Forum
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Avnet Boards Forums to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 1 reply
  • Subscribers 328 subscribers
  • Views 896 views
  • Users 0 members are here
Related

Zedboard AMP petalinux-freeRTOS; rtos firmware running?

Former Member
Former Member over 9 years ago

Hi,

I am trying to make an AMP configuration on the zedboard with petalinux on core0 and freeRTOS on core1.

At the moment I have a working petalinux system. To start freertos on core1 I use modprobe zynq_remoteproc_debug. This is the standard zynq_remoteproc module that I copied from the xilinx linux github website with some added prints to see what the module was doing. I also added a single-threaded work queue to call rproc_boot after the firmware is loaded (copied from this website: http://henryomd.blogspot.be/2015/02/zynq-amp-linux-on-cpu0-and-bare-metal.html). The output can be found at the bottom of this page.

The problem is that I am not sure if the freeRTOS firmware is actually working.
I have tried a few different things:

1. Install openSSH on petalinux so I can use the UART port for freeRTOS. I added all openSSH libraries/applications to petalinux with the petalinux-config -c rootfs command.

Problem: Petalinux does not reply with a "SSH-protoversion-softwareversion" when I try to establish a connection ((http://www.cisco.com/web/about/ac123/ac147/archived_issues/ipj_12-4/124_ssh.html figure 2). I am however able to ping between my laptop and the zedboard successfully. I discovered this problem with wireshark, the output file is also at the bottom of this page.

2. Forget openSSH and just use the UART port for freeRTOS. The kernel module zynq_remoteproc_debug was automatically loaded by adding zynq_remoteproc_debug to the /etc/modules file.

Problem: I couldn't get any output from the freeRTOS firmware.
Possible Reasons?:
*Wrong configuration of devive-tree or freeRTOS BSP? (I set stdin and stdout to UART1 in the BSP and set the output in the device-tree to UART0).
* firmware not started?

3. Write a fixed value to the OCM memory at the start of the freeRTOS firmware and in every running task. I then wrote a linux program to read the OCM memory.

Problem: The value did not correspond with the value I wrote in the freeRTOS firmware.
To test if the linux program was actually working I added the ability to write to the OCM. This seems to be working.
Furthermore it was weird to see that the value I wrote to the OCM memory didn't change as soon as I started the freeRTOS firmware.
I disabled the ICACHE and DCACHE of core0 and removed L2 cache from the device-tree to make sure there were no caching issues.
The only reason I can imagine, other than the firmware not being started, is that there is a mismatch between the addresses in the 2 cores. For petalinux I used /dev/mem and in the freeRTOS firmware I used Xil_Out32(); Software code is on the bottom of the page.

4. With the first 3 methods not working, I thought of another idea: sending a software interrupt instead of writing to the OCM memory. I would be able to count the incoming interrupts at core0 with the /proc/interrupts file.

Problem: I didn't receive any interrupts
Possible Reasons?:
*Bad interrupt configuration?
*Bad device-tree configuration?
*Firmware not started?

After all these tries I think the conclusion must be that there is something wrong with the loading of the firmware or the actual firmware. Which seems odd because of the fact that there are no errors in the modprobe output. Also the bootaddress that is being printed out by modprobe corresponds with the address in the linker script.

All my files can be accessed on my bitbucket account:
https://bitbucket.org/sammaes/petalinux/src/ee18e357771206eeba52fa38c3c6596cd6d41304/mimimum/?at=uartRtos
https://bitbucket.org/sammaes/vivadoproject/src/c19a27820217?at=werk

The most important files:

output modprobe zynq_remoteproc_debug: https://bitbucket.org/sammaes/petalinux/src/c2c536f91b3d80b2a115b005d66cf144c2dc2555/mimimum/modprobe.txt?at=uartRtos&fileviewer=file-view-default

wireshark ssh:thttps://bitbucket.org/sammaes/petalinux/src/ee18e357771206eeba52fa38c3c6596cd6d41304/ssh.pcapng?at=uartRtos&fileviewer=file-view-default

dtsi files: thttps://bitbucket.org/sammaes/petalinux/src/ee18e357771206eeba52fa38c3c6596cd6d41304/mimimum/subsystems/linux/configs/device-tree/system-conf.dtsi?at=uartRtos&fileviewer=file-view-default
tthttps://bitbucket.org/sammaes/petalinux/src/ee18e357771206eeba52fa38c3c6596cd6d41304/mimimum/subsystems/linux/configs/device-tree/zynq-7000.dtsi?at=uartRtos&fileviewer=file-view-default

kernel config: thttps://bitbucket.org/sammaes/petalinux/src/ee18e357771206eeba52fa38c3c6596cd6d41304/mimimum/subsystems/linux/configs/kernel/config?at=uartRtos&fileviewer=file-view-default

Linux program that reads/writes OCM memory: https://bitbucket.org/sammaes/vivadoproject/src/c19a27820217d2620d55f42ee2368ff10162d5ba/minimum.sdk/testFirmware/src/helloworld.c?at=werk&fileviewer=file-view-default
freeRTOS firmware: https://bitbucket.org/sammaes/vivadoproject/src/c19a27820217d2620d55f42ee2368ff10162d5ba/minimum.sdk/freertos_minimum_application/src/freertos_hello_world.c?at=werk&fileviewer=file-view-default
In both programs is an include of "../../globalConfig.h". The content of this header file: #define STATUSADDR 0xFFFC0000 //The OCM address to read/write the data

TLDR: I am trying to build an AMP system with petalinux and freeRTOS. Trouble is that I am not sure if the freeRTOS firmware on core1 is actually started. I listed a few things I have tried but none of them seem to be working.

I would be very grateful if someone could help me out with this matter :).



  • Sign in to reply
  • Cancel
  • Former Member
    0 Former Member over 9 years ago

    Hello Sam,

     

    Xilinx just released the Open AMP framework for Zynq with UG1186:

     

    http://www.xilinx.com/support/documentation/sw_manuals/ug1186-zynq-openamp-gsg.pdf

     

    Might be a good place to start.

     

    -Gary

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube