Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
20705 Discussions

Modification of HelloWorld-Baremetal-ARMCC Example fails

Altera_Forum
Honored Contributor II
974 Views

Hello, 

 

I am trying to run an application on HPS. I looked at the Altera example 'altera-socfpga-helloworld-baremetal-armcc' to start off. I run this application just fine. However when I add an additional line of printf("message"); I do not see this output on the console. Why does this happen? (I do build the project with no errors. Is there something additional I am supposed to do?) 

 

On similar lines, after building the GHRD design, I went through the preloader code using DS-5. What I do not understand is, where does my custom application program code fits into the whole picture. If I want to for example, blink led's using delay (in C), where would I write this line of code? 

 

I''m having a tough time figuring out how GHRD designs can be modified to fit custom designs/application. Any pointers would be of help! 

 

Thank you.
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
259 Views

 

--- Quote Start ---  

However when I add an additional line of printf("message"); I do not see this output on the console. Why does this happen? 

--- Quote End ---  

 

Try add "\n" to end of out string, as this: 

printf("message\n"); 

Line Feed or Carriage Return chars usually must be in output text to see it in console. 

 

--- Quote Start ---  

If I want to for example, blink led's using delay (in C), where would I write this line of code? 

--- Quote End ---  

 

Debugger in DS-5 help you find this place -- where LEDs make one blink step, there may insert dummy loop like: 

for (int loo = 0; loo < 1000*1000; loo++) ;
0 Kudos
Reply