This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PROCESSOR-SDK-AMIC110: Extracting code in use from PDK etc.

Part Number: PROCESSOR-SDK-AMIC110
Other Parts Discussed in Thread: AMIC110

Hi all.

I have a hardware and software application that I built starting with the AMIC110 ICE eval module.  I designed my own board using the ICE as a base, adding and subtracting I/O as needed.  I have the system mostly working, and I'd like to extract the software that I am using from the PRU_ICSS-EtherCAT_Slave and pdk_am335x directories and put it under version control.  We're going to build a few thousand of these in the next few years, and I'd like to have a bulletproof code base.  Right now, the code seems to be spread all over the PDK and PRUxxx directories

Is there a simple way to extract the parts of the development environment that are being used?

Failing that, what would the recommended method of getting control of the all the code be?

Thanks!

John

  • Hello John,

    The general use case of the PDK is to build your applications on top of the PDK:

    • add the header files of CSL and device drivers of the PDK to your application source code,
    • link against the object libraries in PDK to generate your application executable.

    If you use the PDK as is, you only need to keep your application code under version control.

    If you need to modify the source code of PDK and rebuild some drivers or the board library, you can put the whole modified PDK under version control for simplicity. 

    It's not clear to me what you want to extract from the PDK. Can you give an example?

    Thanks and regards,

    Jianzhong

  • Hi Jianzhong

    Since I started with the PRU-ICSS ethercat example running on the AMIC110 ICE board, It seems that a lot of code is linked in from lots of different places, and I don't have a good feel for where it all lives. 

    One problem I'm having is that I don't fully understand the CCS build system and all the config variables and parameters to be able to control where the system looks for code and links it it.

    For instance, in the pdk_am335x_1_0_17/packages/ti/board/src/iceAMIC110 directory I have added the pinmux data for my system.

    Also, I added a section in Flash for some device specific storage that I want to use to store calibration information.  This requires a modified boot loader to load the flash block into memory when the system boots. (I suppose I could manually load it from the program, now that I think about it...)

    I had to grab some code in the starterware dal directory to run the ADC on the AMIC110, since the CSL library in the PDK doesn't support it yet.

    Also, in the PRU-ICSS-EtherCAT_Slave_01.00.08.01/examples/board/iceAM335x directory, I modified the gpio_led file. 

    I guess what I'd like is to extract (maybe to a Github project, a tar or zip file) all the sources that are actually IN the finished executable (apart from the standard PDK release), then to be able to import it into a CCS project and build it.  

    John

  • One problem I'm having is that I don't fully understand the CCS build system and all the config variables and parameters to be able to control where the system looks for code and links it it.

    Please check these two FAQs about making CCS projects on top of PDK:

    [FAQ] AM3359: How do I create a CCS project for my application which will be built on top of the PDK from Processor SDK RTOS

    [FAQ] How do I create a CCS project for AM335x/AM437x bare-metal (no SYS/BIOS) application based on the PDK?

    For instance, in the pdk_am335x_1_0_17/packages/ti/board/src/iceAMIC110 directory I have added the pinmux data for my system.

    I would rebuild the board library for iceAMIC110 according to instructions on creating custom board library, and then linking the application against the new board library. So the changes can be kept within PDK.

    Also, I added a section in Flash for some device specific storage that I want to use to store calibration information.  This requires a modified boot loader to load the flash block into memory when the system boots

    I suspect your bootloader is separate from your application code. So similar to the board library, these changes can also be kept within PDK which can be put under version control. This way, it is clear what changes are made to the original PDK.

    I had to grab some code in the starterware dal directory to run the ADC on the AMIC110, since the CSL library in the PDK doesn't support it yet.

    Since this is not available in CSL, and linking both the starterware and CSL may cause conflicts, I would move this to the application source code. That would require moving all related header files and source code. Unfortunately there is no automatic way to do it. 

    Also, in the PRU-ICSS-EtherCAT_Slave_01.00.08.01/examples/board/iceAM335x directory, I modified the gpio_led file. 

    Since this is in the example folder, it is not in any library. I would move this to the application source code too.

    So in summary, if what you use/modify belongs to an object library of the PDK which is linked to your application, you should keep that within the PDK. On the other hand, if the source code is not in any library used for your application, you can put it in your application code. So you would have two version control repositories, the modified PDK and your application.

    I hope this helps.

    Regards,

    Jianzhong

  • I'll think some more about it and come up with a plan.  I originally thought about making a new target as you suggest above but it seemed very complicated.  Maybe I'll go back and figure that out.  Thanks for the other suggestions as well.

    John