We can now use SDCC's __nonbanked feature

This allows us to reduce CODE footprint of SDCC projects
built with --model-huge. Use carefully!

* Added a facility which allows us to enable/disable the
  feature from the CPU dir (CC_CONF_NON_BANKED_OPTIMIZATION)
* Added the CC_NON_BANKED keyword to some platform files
  (expands to __nonbanked)
* Started using this for some examples
This commit is contained in:
George Oikonomou 2012-04-01 20:07:53 +01:00
parent d3b4efa06f
commit dd26accc07
10 changed files with 46 additions and 27 deletions

View file

@ -63,7 +63,7 @@
/*---------------------------------------------------------------------------*/
/* Bit-Bang write a byte to the chip */
static void
bit_bang_write(uint8_t byte)
bit_bang_write(uint8_t byte) CC_NON_BANKED
{
uint8_t i;
uint8_t bit;
@ -85,7 +85,7 @@ bit_bang_write(uint8_t byte)
/*---------------------------------------------------------------------------*/
/* Bit-Bang read a byte from the chip */
static uint8_t
bit_bang_read()
bit_bang_read() CC_NON_BANKED
{
int8_t i;
uint8_t bits = 0;
@ -102,7 +102,7 @@ bit_bang_read()
}
/*---------------------------------------------------------------------------*/
static void
select()
select() CC_NON_BANKED
{
/* Read current ser/par value */
uint8_t ser_par = n740_ser_par_get();
@ -116,7 +116,7 @@ select()
}
/*---------------------------------------------------------------------------*/
static void
deselect()
deselect() CC_NON_BANKED
{
/* Read current ser/par value */
uint8_t ser_par = n740_ser_par_get();