PSoC3 Small Memory Model

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

cross mob
Anonymous
Not applicable

The Keil documentation includes a

   

#pragma small

   

directive to allow small model code to be generated on a function or file scope.  If I put the directive in the file I get the following error:

   

ERROR:   :#pragma SMALL: PARSING INVOKE-/#PRAGMA-LINE RESPECIFIED OR CONFLICTING CONTROL

   

since the PSoC Creator command line has the LARGE directive.  Is there any way to remove the LARGE directive from the command line?

0 Likes
3 Replies
rotec_264361
Level 2
Level 2

Hi,

   

may be I am on the wrong track here but doesn't PSoC 3 use a memory model to address the SFRs that would not work with the small memory model of Keil? The default to LARGE has probably a good reason other than creating LARGEr code.

   

Bob

0 Likes
MarkA_91
Employee
Employee
25 replies posted 10 replies posted 5 replies posted

You can use the Keil small memory model (and compact model and other 8051 features) with PSoC Creator, in a limited fashion.  Please see AN60360 for details.

0 Likes
Anonymous
Not applicable

Thanks for the response.  Application note is actually AN60630, PSoC3 8051 Code Optimization.

0 Likes