Intel® SoC FPGA Embedded Development Suite
Support for SoC FPGA Software Development, SoC FPGA HPS Architecture, HPS SoC Boot and Configuration, Operating Systems
446 Discussions

HWlib baremetal project issue: How to devide the codes.

CAlex
New Contributor II
819 Views

Hi,

forgive me to ask a foolish question:

How to devide the codes in the project.

I devided the codes into FPGA part and HPS part.

CAlex_0-1684230825949.png

As you can see both header files contain "alt_printf.h" and "alt_clock_manager.h"

which cause the multiple compiling and cause a lot of errors.

Do you have any ideas to solve that problem?

 

Reguards.

0 Kudos
10 Replies
JingyangTeh
Employee
789 Views

Hi Alex


Including the same header multiple time would not be a problem.

In the header files there are header guards.


Could you share me what are the error that you are seeing?


Regards

Jingyang, Teh


0 Kudos
CAlex
New Contributor II
783 Views

Hi,

I deleted the project but the issue is 

alt_printf.c and alt_clock-manager.h have multiple definition. 

Now I wrote these codes in one file using GNU.

0 Kudos
JingyangTeh
Employee
734 Views

HI Alex


After merging both files into one is it still having issues?

What error that you seen previously?


Regards

Jingyang, Teh


0 Kudos
CAlex
New Contributor II
727 Views

No,

it didnt happen any more.

BTW,

could I ask a question about debug?

While using SPL-debug.ds, it will stop at spl-boot-device function.

Usually I will do F8 to let it ran and disconnect.

But sometimes when I re-connect the SPL-debug.ds it will have a invisiable breakpoint at spl-boot-device, I cant step and run, I can only do jump to continue.

The same thing happened in main function as well, when I make a breakpoint(red dot,which means DS soft breakpoint?), I cant step/jump/continue the function. Actually when I do the step,it will only step till the main function reaches. The only thing I can do is disconnnect, cancel/add the breakpoint and reconnect again.

And then it will automatically do the main function even when I want to do the step.

I wrote some timer ISR and enabled some timers,is that the reason?

 

0 Kudos
JingyangTeh
Employee
701 Views

Hi Alex


Did you do a power cycle before resetting?

Sometimes the debugger did not clear of the breakpoint properly and might stuck somewhere.


Regards

Jingyang, Teh


0 Kudos
CAlex
New Contributor II
698 Views

Hi

I believe I did.

Often I waited for 1min ~ 2mins.

I think it is enough for the power cycle.

 

Reguards.

0 Kudos
JingyangTeh
Employee
675 Views

Hi Alex


Sorry I am not a very expert in the debug tool.

Could it be that the symbols files flashed into the board and the IDE are mismatched?


Regards

Jingyang, Teh


0 Kudos
JingyangTeh
Employee
651 Views

Hi Alex


Do you have an update on this?

Are you able to check if the symbols files are matching?


Regards

Jingyang, Teh


0 Kudos
CAlex
New Contributor II
645 Views

Hi,

no update yet.

Since this problem didnt bother me anymore, please do what you must to the thread.

 

Reguards.

0 Kudos
JingyangTeh
Employee
635 Views

Hi


Since this thread been resolve, I shall set this thread to close pending. If you still need further assistance, you are welcome reopen this thread within 20days or open a new thread, some one will be right with you. Please login to ‘https://supporttickets.intel.com’, view details of the desire request, and post a feed/response within the next 15 days to allow me to continue to support you. After 15 days, this thread will be transitioned to community support. The community users will be able to help you on your follow-up questions.


If you happened to close this thread you might receive a survey. If you think you would rank your support experience less than 10 out of 10, please allow me to correct it before closing or if the problem can’t be corrected, please let me know the cause so that I may improve your future service experience.


Regards

Jingyang, Teh


0 Kudos
Reply