Skip to content
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

does not compile on teensy 3.X #65

Open
apleschu opened this issue Mar 9, 2016 · 12 comments

Comments

Projects
None yet
8 participants
@apleschu
Copy link

commented Mar 9, 2016

Trying to compile the library on a teensy 3.2 for a ILI9341 320x240 display produces the following errors:

/Users/andy/src/Arduino/libraries/Ucglib/src/Ucglib.cpp: In function 'void ucg_com_arduino_init_8bit(ucg_t_)':
/Users/andy/src/Arduino/libraries/Ucglib/src/Ucglib.cpp:786:20: error: cannot convert 'volatile uint8_t_ {aka volatile unsigned char_}' to 'volatile uint32_t_ {aka volatile long unsigned int_}' in assignment
u8g_data_port[0] = portOutputRegister(digitalPinToPort(ucg->pin_list[UCG_PIN_D0]));
^
/Users/andy/src/Arduino/libraries/Ucglib/src/Ucglib.cpp:789:20: error: cannot convert 'volatile uint8_t_ {aka volatile unsigned char_}' to 'volatile uint32_t_ {aka volatile long unsigned int_}' in assignment
u8g_data_port[1] = portOutputRegister(digitalPinToPort(ucg->pin_list[UCG_PIN_D1]));
^
/Users/andy/src/Arduino/libraries/Ucglib/src/Ucglib.cpp:792:20: error: cannot convert 'volatile uint8_t_ {aka volatile unsigned char_}' to 'volatile uint32_t_ {aka volatile long unsigned int_}' in assignment
u8g_data_port[2] = portOutputRegister(digitalPinToPort(ucg->pin_list[UCG_PIN_D2]));
^
/Users/andy/src/Arduino/libraries/Ucglib/src/Ucglib.cpp:795:20: error: cannot convert 'volatile uint8_t_ {aka volatile unsigned char_}' to 'volatile uint32_t_ {aka volatile long unsigned int_}' in assignment
u8g_data_port[3] = portOutputRegister(digitalPinToPort(ucg->pin_list[UCG_PIN_D3]));
^
/Users/andy/src/Arduino/libraries/Ucglib/src/Ucglib.cpp:798:20: error: cannot convert 'volatile uint8_t_ {aka volatile unsigned char_}' to 'volatile uint32_t_ {aka volatile long unsigned int_}' in assignment
u8g_data_port[4] = portOutputRegister(digitalPinToPort(ucg->pin_list[UCG_PIN_D4]));
^
/Users/andy/src/Arduino/libraries/Ucglib/src/Ucglib.cpp:801:20: error: cannot convert 'volatile uint8_t_ {aka volatile unsigned char_}' to 'volatile uint32_t_ {aka volatile long unsigned int_}' in assignment
u8g_data_port[5] = portOutputRegister(digitalPinToPort(ucg->pin_list[UCG_PIN_D5]));
^
/Users/andy/src/Arduino/libraries/Ucglib/src/Ucglib.cpp:806:22: error: cannot convert 'volatile uint8_t_ {aka volatile unsigned char_}' to 'volatile uint32_t_ {aka volatile long unsigned int_}' in assignment
u8g_data_port[6] = portOutputRegister(digitalPinToPort(ucg->pin_list[UCG_PIN_D6]));
^
/Users/andy/src/Arduino/libraries/Ucglib/src/Ucglib.cpp:812:22: error: cannot convert 'volatile uint8_t_ {aka volatile unsigned char_}' to 'volatile uint32_t_ {aka volatile long unsigned int_}' in assignment
u8g_data_port[7] = portOutputRegister(digitalPinToPort(ucg->pin_list[UCG_PIN_D7]));
^
/Users/andy/src/Arduino/libraries/Ucglib/src/Ucglib.cpp:816:20: error: cannot convert 'volatile uint8_t_ {aka volatile unsigned char_}' to 'volatile uint32_t_ {aka volatile long unsigned int_}' in assignment
u8g_data_port[8] = portOutputRegister(digitalPinToPort(ucg->pin_list[UCG_PIN_WR]));
^
/Users/andy/src/Arduino/libraries/Ucglib/src/Ucglib.cpp: In function 'void ucg_com_arduino_send_8bit(ucg_t_, uint8_t)':
/Users/andy/src/Arduino/libraries/Ucglib/src/Ucglib.cpp:825:3: error: '__NOP' was not declared in this scope
__NOP;
^
exit status 1
Error compiling.

@jgilbert20

This comment has been minimized.

Copy link

commented Aug 1, 2016

Same issue here. Using 1.29 Teensy + last release.

@emilien-g

This comment has been minimized.

Copy link

commented Aug 26, 2016

Same issue with Teensyduino1.29 and Arduino 1.6.9

@olikraus

This comment has been minimized.

Copy link
Owner

commented Jan 7, 2017

I need more information here. __NOP is only used if arm is defined. But then, __NOP should be available.

@Jorgen-VikingGod

This comment has been minimized.

Copy link

commented Apr 24, 2017

I had the same issues on my Teensy 3.1 setup.
Did some small changes to support the Teensy 3.1/3.2
olikraus/Ucglib_Arduino#7

@mamama1

This comment has been minimized.

Copy link

commented Jul 15, 2018

Hi

same here for the Teensy 3.5.
@Jorgen-VikingGod your fix works for me, if I change MK20DX256 to MK64FX512, which is the Teensy 3.5 CPU.

Is this going to be fixed at some point?

Thanks!

@MattMatic

This comment has been minimized.

Copy link

commented Sep 14, 2018

Same issue for me too. My hack remedy was this:

Ucglib.cpp, line 786 - change the ...defined(__arm__)... to ...defined(__NOT_arm__)...
Ucglib.cpp, line 833, add the following:

#ifndef __NOP
#define __NOP __asm__ __volatile__("NOP");
#endif

Now compiles :-)

@dentaku-web

This comment has been minimized.

Copy link

commented Sep 21, 2018

Well, it seems I'm not the only person having the problem so that's good I guess but not good that it's been happening since 2016.
Arduino IDE version 1.8.5 and Ucglib version 1.5.2.

C:\Users\dentaku\Documents\Arduino\libraries\Ucglib\src\Ucglib.cpp: In function 'void ucg_com_arduino_init_8bit(ucg_t*)':

C:\Users\dentaku\Documents\Arduino\libraries\Ucglib\src\Ucglib.cpp:795:20: error: cannot convert 'volatile uint8_t* {aka volatile unsigned char*}' to 'volatile uint32_t* {aka volatile long unsigned int*}' in assignment

u8g_data_port[0] = portOutputRegister(digitalPinToPort(ucg->pin_list[UCG_PIN_D0]));

                ^

C:\Users\dentaku\Documents\Arduino\libraries\Ucglib\src\Ucglib.cpp:798:20: error: cannot convert 'volatile uint8_t* {aka volatile unsigned char*}' to 'volatile uint32_t* {aka volatile long unsigned int*}' in assignment

u8g_data_port[1] = portOutputRegister(digitalPinToPort(ucg->pin_list[UCG_PIN_D1]));

                ^

C:\Users\dentaku\Documents\Arduino\libraries\Ucglib\src\Ucglib.cpp:801:20: error: cannot convert 'volatile uint8_t* {aka volatile unsigned char*}' to 'volatile uint32_t* {aka volatile long unsigned int*}' in assignment

u8g_data_port[2] = portOutputRegister(digitalPinToPort(ucg->pin_list[UCG_PIN_D2]));

                ^

C:\Users\dentaku\Documents\Arduino\libraries\Ucglib\src\Ucglib.cpp:804:20: error: cannot convert 'volatile uint8_t* {aka volatile unsigned char*}' to 'volatile uint32_t* {aka volatile long unsigned int*}' in assignment

u8g_data_port[3] = portOutputRegister(digitalPinToPort(ucg->pin_list[UCG_PIN_D3]));

                ^

C:\Users\dentaku\Documents\Arduino\libraries\Ucglib\src\Ucglib.cpp:807:20: error: cannot convert 'volatile uint8_t* {aka volatile unsigned char*}' to 'volatile uint32_t* {aka volatile long unsigned int*}' in assignment

u8g_data_port[4] = portOutputRegister(digitalPinToPort(ucg->pin_list[UCG_PIN_D4]));

                ^

C:\Users\dentaku\Documents\Arduino\libraries\Ucglib\src\Ucglib.cpp:810:20: error: cannot convert 'volatile uint8_t* {aka volatile unsigned char*}' to 'volatile uint32_t* {aka volatile long unsigned int*}' in assignment

u8g_data_port[5] = portOutputRegister(digitalPinToPort(ucg->pin_list[UCG_PIN_D5]));

                ^

C:\Users\dentaku\Documents\Arduino\libraries\Ucglib\src\Ucglib.cpp:815:22: error: cannot convert 'volatile uint8_t* {aka volatile unsigned char*}' to 'volatile uint32_t* {aka volatile long unsigned int*}' in assignment

 u8g_data_port[6] =  portOutputRegister(digitalPinToPort(ucg->pin_list[UCG_PIN_D6]));

                  ^

C:\Users\dentaku\Documents\Arduino\libraries\Ucglib\src\Ucglib.cpp:821:22: error: cannot convert 'volatile uint8_t* {aka volatile unsigned char*}' to 'volatile uint32_t* {aka volatile long unsigned int*}' in assignment

 u8g_data_port[7] =  portOutputRegister(digitalPinToPort(ucg->pin_list[UCG_PIN_D7]));

                  ^

C:\Users\dentaku\Documents\Arduino\libraries\Ucglib\src\Ucglib.cpp:825:20: error: cannot convert 'volatile uint8_t* {aka volatile unsigned char*}' to 'volatile uint32_t* {aka volatile long unsigned int*}' in assignment

u8g_data_port[8] = portOutputRegister(digitalPinToPort(ucg->pin_list[UCG_PIN_WR]));

                ^

C:\Users\dentaku\Documents\Arduino\libraries\Ucglib\src\Ucglib.cpp: In function 'void ucg_com_arduino_send_8bit(ucg_t*, uint8_t)':

C:\Users\dentaku\Documents\Arduino\libraries\Ucglib\src\Ucglib.cpp:834:3: error: '__NOP' was not declared in this scope

__NOP;

^

Using library SPI at version 1.0 in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SPI
Using library Ucglib at version 1.5.2 in folder: C:\Users\dentaku\Documents\Arduino\libraries\Ucglib
Error compiling for board Teensy 3.2 / 3.1.

@mamama1

This comment has been minimized.

Copy link

commented Sep 21, 2018

Some sign from @olikraus would be nice to get some idea whether this is by design and we are using it wrong in some way or if this will get fixed at some time...

@MattMatic

This comment has been minimized.

Copy link

commented Sep 21, 2018

Actually, having got ucglib working I checked out all the ILI9341_t3 variants again. In the end I went for blackketter's version - https://github.com/blackketter/ILI9341_t3 - it's blazingly fast and has a reasonable amount of font handling to support right justified text etc.

It wasn't that hard to switch over in the end.

Sorry Oli.

@olikraus

This comment has been minimized.

Copy link
Owner

commented Sep 21, 2018

It wasn't that hard to switch over in the end.
Sorry Oli.

No issue. It is hard to stay up to date with the changes on these new Arduino boards.
The problem was, I made too many assumptions on the controller. This improves speed, but breaks newer board.

I started to concentrate on U8g2, no time left for ucglib since a long time. Sorry for this.

@MattMatic

This comment has been minimized.

Copy link

commented Sep 24, 2018

Good to hear you're still around Oli! The U8g2 library is excellent - keep up the good work on that ;)

@olikraus

This comment has been minimized.

Copy link
Owner

commented Sep 24, 2018

Thanks...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.