C programming in M4 using linux

Discussion in 'UDOO NEO' started by Goutam bhat, Jan 11, 2017.

  1. Goutam bhat

    Goutam bhat New Member

    Joined:
    Dec 29, 2016
    Messages:
    13
    Likes Received:
    0
    I have a c code , i need to execute that program in M4 processor using linux terminal. Can anyone please guide me how to do it?
     
  2. Andrea Rovai

    Andrea Rovai Well-Known Member

    Joined:
    Oct 27, 2014
    Messages:
    1,703
    Likes Received:
    240
  3. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
  4. Goutam bhat

    Goutam bhat New Member

    Joined:
    Dec 29, 2016
    Messages:
    13
    Likes Received:
    0
    i dont want to use arduino sketch. Is there any way to execute C program without using arduino sketch using linux terminal only? Please give the solution
     
  5. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
    In the documentation link Andrea gave is the following instruction which does exactly what you want:
    Precompiled binary

    It's possible to upload a precompiled binary firmware on the M4 using this command:

    udooneo-m4uploader.sh <BINARY_PATH>
     
  6. Goutam bhat

    Goutam bhat New Member

    Joined:
    Dec 29, 2016
    Messages:
    13
    Likes Received:
    0
    Can you please say me what is precompiled binary firmware? Is it the object file which we get after compilation of C program? If not then how to get precompiled binary firmware of C program. Please guide me
     
  7. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
    Yes that is the object file after compilation. To get a compiled object file please follow the link I already gave you. If you have more questions about that please ask the questions in that thread.

    There is no guide available. There are some examples in the he NXP forum and documentation. The link is in the other thread.
     
  8. jas-mx

    jas-mx Active Member

    Joined:
    Dec 31, 2013
    Messages:
    407
    Likes Received:
    118
    Walters/Andreas advice isn't all correct (and confusing), if want to run 'C' code on the M4 your options are to either develop your application using FreeRTOS or MQX. The compiled binary should only be loaded onto the M4 using uboot, if your attempting to do this after the A9 has booted Linux then your asking for problems. The bare metal approach for running code on the M4 isn't recommended for novices due to the complexity of initialising the M4 before running your application code. In fact all the approaches require you to get up to speed with the boot process for the i.mx6sx and understanding the heterogeneous architecture which can be found in the Reference Manual.

    If the above isn't making much sense then you have a steep learning curve to achieve your objective.
     
    Last edited: Jan 14, 2017
    waltervl likes this.
  9. Goutam bhat

    Goutam bhat New Member

    Joined:
    Dec 29, 2016
    Messages:
    13
    Likes Received:
    0

    Hello jas,
    can you please say me how to install FreeRTOS in UDOO neo ,I downloaded the tar file but didnt how to proceed further.Waiting for your response

    Thank you.
     
  10. jas-mx

    jas-mx Active Member

    Joined:
    Dec 31, 2013
    Messages:
    407
    Likes Received:
    118
    After you unpack the tar, there is a doc directory which contains Getting_Started_with_FreeRTOS_BSP_for_i.MX_6SoloX.pdf thats you should read. You need to install gcc-arm-none-eabi. Then first thing to you need to do is amend the board.h file in examples/imx6sx_sdb_m4 to support the peripherals for the Neo and try to build an example for that board. The debug UART is already configured correctly so your PRINTF should output to the M4 serial debug port.

    If the above doesn't make much sense the your learning curve is going to be steep.
     
    Last edited: Feb 4, 2017
  11. Goutam bhat

    Goutam bhat New Member

    Joined:
    Dec 29, 2016
    Messages:
    13
    Likes Received:
    0
    Thanks a lot Mr.jas mx sir
     
  12. computer science pdf

    computer science pdf New Member

    Joined:
    Jul 31, 2018
    Messages:
    1
    Likes Received:
    0

Share This Page