AnsweredAssumed Answered

MCAPI code generation from system.svc

Question asked by lukma on Aug 15, 2017
Latest reply on Sep 20, 2017 by Kader.M

Dear Analog,

 

In the other post - Code generation from system.svc user "amci" mentioned:

 


Other Add-ins, like the MCAPI, PinMux and SRU Add-ins have their own Java implementation to read and generate source files (the use Apache Velocity).

 

If I might ask - how the MCAPI code is exactly (re)generated and finally added to the project (for SHARC core)?

 

I would like to add some breakpoints to it (to for example mcapi_endpoint.c) in the CCES 2.6 IDE as well as some redirected stdio/uart output (like printf, adi_uart_send) for debugging.

 

On my system the mcapi sources can be found at [*]:

<cces2.6 install path>\SHARC\lib\src\services\Source\mcapi\mcapi_*.c

 

Unfortunately, I cannot find how those files are generated and added to the cces 2.6 project. There is no mcapi library (or any other object file) visible in my cces2.6 project (mcapi_scalar_Core1).

 

Also the "project properties" (alt + enter) ->C/C++ Build -> Settings -> CrossCore SHARC Linker -> General in the section

"Library search directories (-L):" only points to startup_ldf.

Hence the question - how the mcapi library is linked to the project? Where is it placed (in which L1/L2 SHARC section)?

 

I also cannot set breakpoints in those [*] mcapi files (even though I've added them as "sources" to my project).

The only workaround is to play around with "Disassemble" view and set manually breakpoints to addresses.

 

For mcapi I can only inspect the code at ./system/mcapi/GeneratedSources/mcapi_config.c - which is autogenerated.

 

How can I debug this mcapi code [*]?

 

Thanks in advance,

Łukasz

Outcomes