Arrays of function pointers?? | Cypress Semiconductor
Arrays of function pointers??
Just a quick check - has anybody used function pointers and arrays thereof with PSoC 1? I'm using a '437 and cannot for the life of me get an array of function pointers to work using standard C syntax etc. Neither I nor a coworker can tell any difference between mine and numerous tutorials on the web (for standard C, anyhow). The same coworker has successfully used an array of function pointers on a PSoC1, though with an older version of Designer (4.something, I think) and the compiler, for a 794.
I might post my project, but honestly I am in project mode and got it working using a large switch/case statement, so I might not bother right now. Just wondered if anybody had any experience or prior problems.
Also, while I'm thinking of it - something we found that seemed strange - does the generated .lst file always contain a copy of ALL compiled/assembled code? Because I looked at my call of a function via said array of function pointers in the list file - it did some register/memory shifting and then (I believe - going from memory here) an ljmp to a "__plcall" ("pointer long call", presumably) function, at a specified address of course. However, my listing stopped just before that address and no trace of __plcall could be found except in the map file (specifying it at that phantom address). Didn't dig into the raw hex file to look for it though. Couldn't find __plcall on the Cypress web site anywhere either.
The kicker was that we moved a (very simple) ISR from the bottom of main.c to earlier in the file, and __plcall() appeared in the list. But I'm nowhere near RAM or flash capacity (both in the 30 percents). Weird...at least to this PSoC newb.
Has anyone seen either of these things before?