Non-Blocking System Call Pseudo Code

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Hey! Was trying out the non-blocking system call laid out on page 153 of the psoc 4 architecture TRM (http://www.cypress.com/file/126171/download). I failed to build the project on PSOC Creator 4.0 due to the error

   

"Build error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'"

   

due to the keywords "_sram" or "_ram" etc... Further reading told me that I had to specify the locations of sram, ram and flash in a linker file. Is there a tutorial online where I could learn how to do this?

0 Likes
5 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

I cannot see the need for your _sram and _ram attributes. Where did you get that code from?

   

Can you please post your complete project so that we all can have a look at all of your settings. To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.

   

 

   

Bob

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Like i mentioned, the code was from page 153 of the psoc 4 architecture TRM (http://www.cypress.com/file/126171/download)

   

From what i understand, the function SpcIntHandler() needs to be placed in the ram (more specifically at address 0x20000000) because we want the interrupt to be handled by this handler in RAM instead of the one in Flash. The motivation for this project was too see how these interrupts were called when making such system calls.

   

Anyway attached is the bundle.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

There is still no code to be found on page 153 on your provided manual link.

   

I cannot see any advantages from using the provided flash-write routines which are already provided in your chip in the system rom.

   

Have a look into chapter 8 regarding Flash in the "System Reference Guide" (from Creator Help menu).

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Whoops, my apologies i was referring to an older version. The code is in page 293 of this manual.

0 Likes
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

There is example of executing from RAM,  

   

http://www.cypress.com/blog/psoc-insiders-blog/running-code-ram-using-psoc5-and-gcc-compiler

   

it didn't work for me, please post a demo if successful

0 Likes