Skip to content

section .text' will not fit in region iram1_0_seg' #88

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
einsteinx2 opened this issue Apr 19, 2015 · 11 comments
Closed

section .text' will not fit in region iram1_0_seg' #88

einsteinx2 opened this issue Apr 19, 2015 · 11 comments

Comments

@einsteinx2
Copy link

I'm trying to adapt https://github.com/cnlohr/ws2812esp8266 for use with the Arduino IDE, but I keep running into this error: section '.text' will not fit in region 'iram1_0_seg'

I'm using the latest code from this repo compiled myself, so I should have the latest fixes.

@igrr
Copy link
Member

igrr commented Apr 21, 2015

Can you post your work-in-progress code somewhere? I suspect the reason is that the code from .cpp files is automatically placed into .irom0.text (see linker script), whereas code from .c files does not.
So if you are using cnlohr's code as is you are likely filling up the .iram.text section.

@einsteinx2
Copy link
Author

I'll post the code when I get home tonight.

@einsteinx2
Copy link
Author

Turned out that I needed to add ICACHE_FLASH_ATTR to all of the functions to move them out of region.

@sticilface
Copy link
Contributor

Thought id give compiling the u8glib now that the iram has been increased. Guess what.. this error has gone. Only to be replaced by a new one... error below...



Build options changed, rebuilding all
/Users/amelvin/Documents/Arduino/libraries/U8glib/utility/u8g_com_arduino_fast_parallel.c: In function 'u8g_com_arduino_fast_parallel_init':
/Users/amelvin/Documents/Arduino/libraries/U8glib/utility/u8g_com_arduino_fast_parallel.c:104:20: warning: assignment from incompatible pointer type [enabled by default]
   u8g_data_port[0] =  portOutputRegister(digitalPinToPort(u8g->pin_list[U8G_PI_D0]));
                    ^
/Users/amelvin/Documents/Arduino/libraries/U8glib/utility/u8g_com_arduino_fast_parallel.c:106:20: warning: assignment from incompatible pointer type [enabled by default]
   u8g_data_port[1] =  portOutputRegister(digitalPinToPort(u8g->pin_list[U8G_PI_D1]));
                    ^
/Users/amelvin/Documents/Arduino/libraries/U8glib/utility/u8g_com_arduino_fast_parallel.c:108:20: warning: assignment from incompatible pointer type [enabled by default]
   u8g_data_port[2] =  portOutputRegister(digitalPinToPort(u8g->pin_list[U8G_PI_D2]));
                    ^
/Users/amelvin/Documents/Arduino/libraries/U8glib/utility/u8g_com_arduino_fast_parallel.c:110:20: warning: assignment from incompatible pointer type [enabled by default]
   u8g_data_port[3] =  portOutputRegister(digitalPinToPort(u8g->pin_list[U8G_PI_D3]));
                    ^
/Users/amelvin/Documents/Arduino/libraries/U8glib/utility/u8g_com_arduino_fast_parallel.c:113:20: warning: assignment from incompatible pointer type [enabled by default]
   u8g_data_port[4] =  portOutputRegister(digitalPinToPort(u8g->pin_list[U8G_PI_D4]));
                    ^
/Users/amelvin/Documents/Arduino/libraries/U8glib/utility/u8g_com_arduino_fast_parallel.c:115:20: warning: assignment from incompatible pointer type [enabled by default]
   u8g_data_port[5] =  portOutputRegister(digitalPinToPort(u8g->pin_list[U8G_PI_D5]));
                    ^
/Users/amelvin/Documents/Arduino/libraries/U8glib/utility/u8g_com_arduino_fast_parallel.c:117:20: warning: assignment from incompatible pointer type [enabled by default]
   u8g_data_port[6] =  portOutputRegister(digitalPinToPort(u8g->pin_list[U8G_PI_D6]));
                    ^
/Users/amelvin/Documents/Arduino/libraries/U8glib/utility/u8g_com_arduino_fast_parallel.c:119:20: warning: assignment from incompatible pointer type [enabled by default]
   u8g_data_port[7] =  portOutputRegister(digitalPinToPort(u8g->pin_list[U8G_PI_D7]));
                    ^
/Users/amelvin/Documents/Arduino/libraries/U8glib/utility/u8g_com_arduino_no_en_parallel.c: In function 'u8g_com_arduino_no_en_parallel_init':
/Users/amelvin/Documents/Arduino/libraries/U8glib/utility/u8g_com_arduino_no_en_parallel.c:87:20: warning: assignment from incompatible pointer type [enabled by default]
   u8g_data_port[0] =  portOutputRegister(digitalPinToPort(u8g->pin_list[U8G_PI_D0]));
                    ^
/Users/amelvin/Documents/Arduino/libraries/U8glib/utility/u8g_com_arduino_no_en_parallel.c:89:20: warning: assignment from incompatible pointer type [enabled by default]
   u8g_data_port[1] =  portOutputRegister(digitalPinToPort(u8g->pin_list[U8G_PI_D1]));
                    ^
/Users/amelvin/Documents/Arduino/libraries/U8glib/utility/u8g_com_arduino_no_en_parallel.c:91:20: warning: assignment from incompatible pointer type [enabled by default]
   u8g_data_port[2] =  portOutputRegister(digitalPinToPort(u8g->pin_list[U8G_PI_D2]));
                    ^
/Users/amelvin/Documents/Arduino/libraries/U8glib/utility/u8g_com_arduino_no_en_parallel.c:93:20: warning: assignment from incompatible pointer type [enabled by default]
   u8g_data_port[3] =  portOutputRegister(digitalPinToPort(u8g->pin_list[U8G_PI_D3]));
                    ^
/Users/amelvin/Documents/Arduino/libraries/U8glib/utility/u8g_com_arduino_no_en_parallel.c:96:20: warning: assignment from incompatible pointer type [enabled by default]
   u8g_data_port[4] =  portOutputRegister(digitalPinToPort(u8g->pin_list[U8G_PI_D4]));
                    ^
/Users/amelvin/Documents/Arduino/libraries/U8glib/utility/u8g_com_arduino_no_en_parallel.c:98:20: warning: assignment from incompatible pointer type [enabled by default]
   u8g_data_port[5] =  portOutputRegister(digitalPinToPort(u8g->pin_list[U8G_PI_D5]));
                    ^
/Users/amelvin/Documents/Arduino/libraries/U8glib/utility/u8g_com_arduino_no_en_parallel.c:100:20: warning: assignment from incompatible pointer type [enabled by default]
   u8g_data_port[6] =  portOutputRegister(digitalPinToPort(u8g->pin_list[U8G_PI_D6]));
                    ^
/Users/amelvin/Documents/Arduino/libraries/U8glib/utility/u8g_com_arduino_no_en_parallel.c:102:20: warning: assignment from incompatible pointer type [enabled by default]
   u8g_data_port[7] =  portOutputRegister(digitalPinToPort(u8g->pin_list[U8G_PI_D7]));
                    ^
/Users/amelvin/Documents/Arduino/libraries/U8glib/utility/u8g_com_arduino_t6963.c: In function 'u8g_com_arduino_t6963_init':
/Users/amelvin/Documents/Arduino/libraries/U8glib/utility/u8g_com_arduino_t6963.c:92:27: warning: assignment from incompatible pointer type [enabled by default]
   u8g_output_data_port[0] =  portOutputRegister(digitalPinToPort(u8g->pin_list[U8G_PI_D0]));
                           ^
/Users/amelvin/Documents/Arduino/libraries/U8glib/utility/u8g_com_arduino_t6963.c:93:26: warning: assignment from incompatible pointer type [enabled by default]
   u8g_input_data_port[0] =  portInputRegister(digitalPinToPort(u8g->pin_list[U8G_PI_D0]));
                          ^
/Users/amelvin/Documents/Arduino/libraries/U8glib/utility/u8g_com_arduino_t6963.c:94:20: warning: assignment from incompatible pointer type [enabled by default]
   u8g_mode_port[0] =  portModeRegister(digitalPinToPort(u8g->pin_list[U8G_PI_D0]));
                    ^
/Users/amelvin/Documents/Arduino/libraries/U8glib/utility/u8g_com_arduino_t6963.c:97:27: warning: assignment from incompatible pointer type [enabled by default]
   u8g_output_data_port[1] =  portOutputRegister(digitalPinToPort(u8g->pin_list[U8G_PI_D1]));
                           ^
/Users/amelvin/Documents/Arduino/libraries/U8glib/utility/u8g_com_arduino_t6963.c:98:26: warning: assignment from incompatible pointer type [enabled by default]
   u8g_input_data_port[1] =  portInputRegister(digitalPinToPort(u8g->pin_list[U8G_PI_D1]));
                          ^
/Users/amelvin/Documents/Arduino/libraries/U8glib/utility/u8g_com_arduino_t6963.c:99:20: warning: assignment from incompatible pointer type [enabled by default]
   u8g_mode_port[1] =  portModeRegister(digitalPinToPort(u8g->pin_list[U8G_PI_D1]));
                    ^
/Users/amelvin/Documents/Arduino/libraries/U8glib/utility/u8g_com_arduino_t6963.c:102:27: warning: assignment from incompatible pointer type [enabled by default]
   u8g_output_data_port[2] =  portOutputRegister(digitalPinToPort(u8g->pin_list[U8G_PI_D2]));
                           ^
/Users/amelvin/Documents/Arduino/libraries/U8glib/utility/u8g_com_arduino_t6963.c:103:26: warning: assignment from incompatible pointer type [enabled by default]
   u8g_input_data_port[2] =  portInputRegister(digitalPinToPort(u8g->pin_list[U8G_PI_D2]));
                          ^
/Users/amelvin/Documents/Arduino/libraries/U8glib/utility/u8g_com_arduino_t6963.c:104:20: warning: assignment from incompatible pointer type [enabled by default]
   u8g_mode_port[2] =  portModeRegister(digitalPinToPort(u8g->pin_list[U8G_PI_D2]));
                    ^
/Users/amelvin/Documents/Arduino/libraries/U8glib/utility/u8g_com_arduino_t6963.c:107:27: warning: assignment from incompatible pointer type [enabled by default]
   u8g_output_data_port[3] =  portOutputRegister(digitalPinToPort(u8g->pin_list[U8G_PI_D3]));
                           ^
/Users/amelvin/Documents/Arduino/libraries/U8glib/utility/u8g_com_arduino_t6963.c:108:26: warning: assignment from incompatible pointer type [enabled by default]
   u8g_input_data_port[3] =  portInputRegister(digitalPinToPort(u8g->pin_list[U8G_PI_D3]));
                          ^
/Users/amelvin/Documents/Arduino/libraries/U8glib/utility/u8g_com_arduino_t6963.c:109:20: warning: assignment from incompatible pointer type [enabled by default]
   u8g_mode_port[3] =  portModeRegister(digitalPinToPort(u8g->pin_list[U8G_PI_D3]));
                    ^
/Users/amelvin/Documents/Arduino/libraries/U8glib/utility/u8g_com_arduino_t6963.c:112:27: warning: assignment from incompatible pointer type [enabled by default]
   u8g_output_data_port[4] =  portOutputRegister(digitalPinToPort(u8g->pin_list[U8G_PI_D4]));
                           ^
/Users/amelvin/Documents/Arduino/libraries/U8glib/utility/u8g_com_arduino_t6963.c:113:26: warning: assignment from incompatible pointer type [enabled by default]
   u8g_input_data_port[4] =  portInputRegister(digitalPinToPort(u8g->pin_list[U8G_PI_D4]));
                          ^
/Users/amelvin/Documents/Arduino/libraries/U8glib/utility/u8g_com_arduino_t6963.c:114:20: warning: assignment from incompatible pointer type [enabled by default]
   u8g_mode_port[4] =  portModeRegister(digitalPinToPort(u8g->pin_list[U8G_PI_D4]));
                    ^
/Users/amelvin/Documents/Arduino/libraries/U8glib/utility/u8g_com_arduino_t6963.c:117:27: warning: assignment from incompatible pointer type [enabled by default]
   u8g_output_data_port[5] =  portOutputRegister(digitalPinToPort(u8g->pin_list[U8G_PI_D5]));
                           ^
/Users/amelvin/Documents/Arduino/libraries/U8glib/utility/u8g_com_arduino_t6963.c:118:26: warning: assignment from incompatible pointer type [enabled by default]
   u8g_input_data_port[5] =  portInputRegister(digitalPinToPort(u8g->pin_list[U8G_PI_D5]));
                          ^
/Users/amelvin/Documents/Arduino/libraries/U8glib/utility/u8g_com_arduino_t6963.c:119:20: warning: assignment from incompatible pointer type [enabled by default]
   u8g_mode_port[5] =  portModeRegister(digitalPinToPort(u8g->pin_list[U8G_PI_D5]));
                    ^
/Users/amelvin/Documents/Arduino/libraries/U8glib/utility/u8g_com_arduino_t6963.c:122:27: warning: assignment from incompatible pointer type [enabled by default]
   u8g_output_data_port[6] =  portOutputRegister(digitalPinToPort(u8g->pin_list[U8G_PI_D6]));
                           ^
/Users/amelvin/Documents/Arduino/libraries/U8glib/utility/u8g_com_arduino_t6963.c:123:26: warning: assignment from incompatible pointer type [enabled by default]
   u8g_input_data_port[6] =  portInputRegister(digitalPinToPort(u8g->pin_list[U8G_PI_D6]));
                          ^
/Users/amelvin/Documents/Arduino/libraries/U8glib/utility/u8g_com_arduino_t6963.c:124:20: warning: assignment from incompatible pointer type [enabled by default]
   u8g_mode_port[6] =  portModeRegister(digitalPinToPort(u8g->pin_list[U8G_PI_D6]));
                    ^
/Users/amelvin/Documents/Arduino/libraries/U8glib/utility/u8g_com_arduino_t6963.c:127:27: warning: assignment from incompatible pointer type [enabled by default]
   u8g_output_data_port[7] =  portOutputRegister(digitalPinToPort(u8g->pin_list[U8G_PI_D7]));
                           ^
/Users/amelvin/Documents/Arduino/libraries/U8glib/utility/u8g_com_arduino_t6963.c:128:26: warning: assignment from incompatible pointer type [enabled by default]
   u8g_input_data_port[7] =  portInputRegister(digitalPinToPort(u8g->pin_list[U8G_PI_D7]));
                          ^
/Users/amelvin/Documents/Arduino/libraries/U8glib/utility/u8g_com_arduino_t6963.c:129:20: warning: assignment from incompatible pointer type [enabled by default]
   u8g_mode_port[7] =  portModeRegister(digitalPinToPort(u8g->pin_list[U8G_PI_D7]));
                    ^
/Users/amelvin/Documents/Arduino/libraries/U8glib/utility/u8g_rot.c:48:1: warning: initialization from incompatible pointer type [enabled by default]
 u8g_dev_t u8g_dev_rot = { u8g_dev_rot_dummy_fn, NULL, NULL };
 ^
/Users/amelvin/Documents/Arduino/libraries/U8glib/utility/u8g_rot.c:48:1: warning: (near initialization for 'u8g_dev_rot.dev_fn') [enabled by default]
/Users/amelvin/git/Arduino/build/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_si2c.c: In function 'twi_delay':
/Users/amelvin/git/Arduino/build/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_si2c.c:77:26: error: 'GPI' undeclared (first use in this function)
   for(i=0;i<v;i++) reg = GPI;
                          ^
/Users/amelvin/git/Arduino/build/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_si2c.c:77:26: note: each undeclared identifier is reported only once for each function it appears in
/Users/amelvin/git/Arduino/build/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_si2c.c: In function 'twi_write_start':
/Users/amelvin/git/Arduino/build/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_si2c.c:32:22: error: 'GPEC' undeclared (first use in this function)
 #define SCL_HIGH()  (GPEC = (1 << twi_scl)) 
                      ^
/Users/amelvin/git/Arduino/build/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_si2c.c:81:3: note: in expansion of macro 'SCL_HIGH'
   SCL_HIGH();
   ^
/Users/amelvin/git/Arduino/build/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_si2c.c:30:23: error: 'GPI' undeclared (first use in this function)
 #define SDA_READ()  ((GPI & (1 << twi_sda)) != 0)
                       ^
/Users/amelvin/git/Arduino/build/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_si2c.c:83:7: note: in expansion of macro 'SDA_READ'
   if (SDA_READ() == 0) return false;
       ^
/Users/amelvin/git/Arduino/build/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_si2c.c:28:22: error: 'GPES' undeclared (first use in this function)
 #define SDA_LOW()   (GPES = (1 << twi_sda)) //Enable SDA (becomes output and since GPO is 0 for the pin, it will pull the line low)
                      ^
/Users/amelvin/git/Arduino/build/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_si2c.c:85:3: note: in expansion of macro 'SDA_LOW'
   SDA_LOW();
   ^
/Users/amelvin/git/Arduino/build/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_si2c.c: In function 'twi_write_stop':
/Users/amelvin/git/Arduino/build/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_si2c.c:31:22: error: 'GPES' undeclared (first use in this function)
 #define SCL_LOW()   (GPES = (1 << twi_scl)) 
                      ^
/Users/amelvin/git/Arduino/build/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_si2c.c:92:3: note: in expansion of macro 'SCL_LOW'
   SCL_LOW();
   ^
/Users/amelvin/git/Arduino/build/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_si2c.c:32:22: error: 'GPEC' undeclared (first use in this function)
 #define SCL_HIGH()  (GPEC = (1 << twi_scl)) 
                      ^
/Users/amelvin/git/Arduino/build/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_si2c.c:95:3: note: in expansion of macro 'SCL_HIGH'
   SCL_HIGH();
   ^
/Users/amelvin/git/Arduino/build/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_si2c.c:33:23: error: 'GPI' undeclared (first use in this function)
 #define SCL_READ()  ((GPI & (1 << twi_scl)) != 0)
                       ^
/Users/amelvin/git/Arduino/build/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_si2c.c:96:10: note: in expansion of macro 'SCL_READ'
   while (SCL_READ() == 0 && (i++) < TWI_CLOCK_STRETCH);// Clock stretching (up to 100us)
          ^
/Users/amelvin/git/Arduino/build/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_si2c.c: In function 'twi_write_bit':
/Users/amelvin/git/Arduino/build/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_si2c.c:31:22: error: 'GPES' undeclared (first use in this function)
 #define SCL_LOW()   (GPES = (1 << twi_scl)) 
                      ^
/Users/amelvin/git/Arduino/build/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_si2c.c:106:3: note: in expansion of macro 'SCL_LOW'
   SCL_LOW();
   ^
/Users/amelvin/git/Arduino/build/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_si2c.c:29:22: error: 'GPEC' undeclared (first use in this function)
 #define SDA_HIGH()  (GPEC = (1 << twi_sda)) //Disable SDA (becomes input and since it has pullup it will go high) 
                      ^
/Users/amelvin/git/Arduino/build/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_si2c.c:107:12: note: in expansion of macro 'SDA_HIGH'
   if (bit) SDA_HIGH();
            ^
/Users/amelvin/git/Arduino/build/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_si2c.c:33:23: error: 'GPI' undeclared (first use in this function)
 #define SCL_READ()  ((GPI & (1 << twi_scl)) != 0)
                       ^
/Users/amelvin/git/Arduino/build/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_si2c.c:111:10: note: in expansion of macro 'SCL_READ'
   while (SCL_READ() == 0 && (i++) < TWI_CLOCK_STRETCH);// Clock stretching (up to 100us)
          ^
/Users/amelvin/git/Arduino/build/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_si2c.c: In function 'twi_read_bit':
/Users/amelvin/git/Arduino/build/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_si2c.c:31:22: error: 'GPES' undeclared (first use in this function)
 #define SCL_LOW()   (GPES = (1 << twi_scl)) 
                      ^
/Users/amelvin/git/Arduino/build/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_si2c.c:118:3: note: in expansion of macro 'SCL_LOW'
   SCL_LOW();
   ^
/Users/amelvin/git/Arduino/build/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_si2c.c:29:22: error: 'GPEC' undeclared (first use in this function)
 #define SDA_HIGH()  (GPEC = (1 << twi_sda)) //Disable SDA (becomes input and since it has pullup it will go high) 
                      ^
/Users/amelvin/git/Arduino/build/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_si2c.c:119:3: note: in expansion of macro 'SDA_HIGH'
   SDA_HIGH();
   ^
/Users/amelvin/git/Arduino/build/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_si2c.c:33:23: error: 'GPI' undeclared (first use in this function)
 #define SCL_READ()  ((GPI & (1 << twi_scl)) != 0)
                       ^
/Users/amelvin/git/Arduino/build/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_si2c.c:122:10: note: in expansion of macro 'SCL_READ'
   while (SCL_READ() == 0 && (i++) < TWI_CLOCK_STRETCH);// Clock stretching (up to 100us)
          ^
/Users/amelvin/git/Arduino/build/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_si2c.c: In function 'twi_readFrom':
/Users/amelvin/git/Arduino/build/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_si2c.c:30:23: error: 'GPI' undeclared (first use in this function)
 #define SDA_READ()  ((GPI & (1 << twi_sda)) != 0)
                       ^
/Users/amelvin/git/Arduino/build/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_si2c.c:164:11: note: in expansion of macro 'SDA_READ'
     while(SDA_READ() == 0 && (i++) < 10){
           ^
/Users/amelvin/git/Arduino/build/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_si2c.c:31:22: error: 'GPES' undeclared (first use in this function)
 #define SCL_LOW()   (GPES = (1 << twi_scl)) 
                      ^
/Users/amelvin/git/Arduino/build/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_si2c.c:165:7: note: in expansion of macro 'SCL_LOW'
       SCL_LOW();
       ^
/Users/amelvin/git/Arduino/build/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_si2c.c:32:22: error: 'GPEC' undeclared (first use in this function)
 #define SCL_HIGH()  (GPEC = (1 << twi_scl)) 
                      ^
/Users/amelvin/git/Arduino/build/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_si2c.c:167:7: note: in expansion of macro 'SCL_HIGH'
       SCL_HIGH();
       ^
Error compiling.

@probonopd
Copy link
Contributor

Nodemcu has u8glib running on ESP8266; maybe it can be ported to ESP8266/Arduino?
https://github.com/nodemcu/nodemcu-firmware/tree/master/app/u8glib

In the meantime, I am using https://gist.github.com/probonopd/bb7e1c04fb07bfad6034 to drive the OLED display.

@tprochazka
Copy link

I tried Adafruit_SSD1331 ad found similar problem with portOutputRegister() function

Adafruit_SSD1331\Adafruit_SSD1331.cpp:307:15: error: cannot convert 'volatile uint32_t* {aka volatile unsigned int*}' to 'PortReg* {aka volatile unsigned char*}' in assignment
     csportreg = portOutputRegister(digitalPinToPort(_cs));
               ^

It is some common problem or ESP8266 ex port?

@Links2004
Copy link
Collaborator

@marvinroger
Copy link
Contributor

Sorry to comment on an old issue, but @igrr you said:

the code from .cpp files is automatically placed into .irom0.text (see linker script), whereas code from .c files does not.

Is this still a true statement? As a library developer I develop in C++, so do I have to add ICACHE_FLASH_ATTR?

@igrr
Copy link
Member

igrr commented Mar 11, 2016

That's not true now. This has been fixed somewhere after 2.0.0 i think, so now all code goes into flash by default. You can use ICACHE_RAM_ATTR for functions which have to be in RAM (like interrupt handlers).

@marvinroger
Copy link
Contributor

So all these occurences are redundant? Thanks for your answer!

@igrr
Copy link
Member

igrr commented Mar 11, 2016

Not all of them. Some come from lwip header files, and those are irrelevant. Some files (like umm_malloc.c) are placed into IRAM by linker script, so there ICACHE_FLASH_ATTR works as an override. Some are redundant and will be cleaned up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants