Replies: 1 comment 1 reply
-
Let my try to answer your questions step by step.
Yes exactly, you just copy everything from the csrc folder. There is a step by step instruction for Atmel Studio, but the concept should be the same for you: https://github.com/olikraus/u8g2/wiki/u8g2as7 Along with the csrc you also need one (or two) extra functions, which will handle the communication with you LPC17xx. I suggest to start with a simple software emulated SPI or I2C interface. In such a case you just need a GPIO and delay callback: https://github.com/olikraus/u8g2/wiki/Porting-to-new-MCU-platform#the-uc-specific-gpio-and-delay-callback I have once created such a callback for the LPC8xx: https://github.com/olikraus/u8g2/blob/master/sys/arm/lpc824/u8g2_logo/u8x8cb.c If you need more performance, then the second callback is required, which will do the transfer on a byte level. It is implemented here: https://github.com/olikraus/lpc804_plu/blob/a12203333f4fc58de74816a4ed0ae59f5d56f5cc/lpc804/u8g2_logo/u8x8cb.c#L138 More detailes are here: https://github.com/olikraus/u8g2/wiki/Porting-to-new-MCU-platform#communication-callback-eg-u8x8_byte_hw_i2c You could also search here in the issues. For example here: #297
You need to activate the linker garbage collection, maybe also called LTO (link time optimization). In fact Arduino relies on this gcc feature a lot. Actually this is not even an optimization, it just removes code and data which is not used in your project. You could try to do this without LTO: |
Beta Was this translation helpful? Give feedback.
-
I need to connect a OLED SSD1306 to a LPC17xx in a project on KEIL ARM using your wonderful library. It is really wonderful how it works in Arduino. But in my case I broke my head. But all to no avail. Please help me understand.
How to connect library to a C project? I take the CSRC folder, make it visible for include, in the main file I do #include "u8g2.h". And what to do with the C files? Connect them all to the project? Then when compiling I get an error that about 200 KB is missing. I don't believe that there is at least one Arduino with such a memory capacity. Apparently including all files is not the right strategy. But which ones? It is not clear from your description. Or I can't read
Beta Was this translation helpful? Give feedback.
All reactions