Jump to content

crteensy

Members
  • Posts

    111
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I've seen the fsmc code. however, I'd like to use it in 4-wire SPI mode because my display pcb only breaks out those pins and that's why looked for other files related to that chip. I'll have a close look at the datasheet as well
  2. When implementing send_data(uint16_t data) for the ILI9341, is it supposed to send just 8 bits? If so, should the 8 MSBs or the 8 LSBs be sent? The encoding of the comments for that function and write_index() seems to be broken. and please please please turn off that filter: The following words in your search query were ignored because they are too common words: ili9341 Regards, Christoph
  3. SSD1331: release_bus() called before post_init_board() ILI9341: post_init_board() called before release_bus() Also how mature is the ILI9341 driver? The oldest file has this commit comment: "New ILI9341 driver - not working fully yet (some display issues)"
  4. At https://bitbucket.org/Tectu/ugfx/src/fb ... 1351.c-121 the bus is released, post_init_board is called, and the bus is released again. If post_init_board aquires the bus, it should also release it. I would remove the first call to release_bus. What was the reason for two calls to release_bus?
  5. Ah nevermind, that was the arduino IDE trying to compile the font C file out of context.
  6. I tried to convert a ttf font file using the online converter both as bit font and as RLE font, with the custom range 'H'-'H' (only one character). I want the glyph to be about 96x96 pixels, so I had to pick 168 pt for the font size. Compiling resulted in the following error: logo_cropped_1_font168_rle.c:11:2: error: #error The font file is not compatible with this version of mcufont. What can I do? Attaching the ttf was not possible because the extension ttf seems to be forbidden.
  7. Success! I can write a wiki article on this, but I think we should wait for the hackaday crowd to pick this up and hopefully give us some feedback...
  8. The code compiles with typedef unsigned char bool_t; // as in RAW32 in gos_arduino.h, for teensy 3.1, arduino uno and arduino mega as targets. I'll try to run an example on a teensy 3.1 later today to see if it actually works.
  9. One workaround is to #include I don't know why I didn't think of that before, but it seems to solve the problem for my specific setup (I'm being very careful here).
  10. When compiling for teensyduino (os=arduino, arm-gcc) I get an error for a typedef: "/home/buffi/builds/arduino/arduino-1.6.6/hardware/tools/avr/../arm/bin/arm-none-eabi-gcc" -c -O -g -Wall -ffunction-sections -fdata-sections -MMD -nostdlib -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -D__MK20DX256__ -DTEENSYDUINO=126 -DARDUINO=10606 -DF_CPU=96000000 -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-I/home/buffi/builds/arduino/arduino-1.6.6/hardware/teensy/avr/cores/teensy3" "-I/home/buffi/Arduino/libraries/teensy3.1-ssd1351-ugfx-config" "-I/home/buffi/Arduino/libraries/ugfx-arduino" "-I/home/buffi/Arduino/libraries/ugfx-ssd1351" "-I/home/buffi/Arduino/libraries/ugfx-repo" "/home/buffi/Arduino/libraries/ugfx-arduino/ugfx-arduino.c" -o "/tmp/build4292d6e9cc31a53e6836e8e33f99359d.tmp/libraries/ugfx-arduino/ugfx-arduino.c.o" In file included from /home/buffi/Arduino/libraries/ugfx-repo/src/../src/gos/gos.h:476:0, from /home/buffi/Arduino/libraries/ugfx-repo/src/../gfx.h:191, from /home/buffi/Arduino/libraries/ugfx-repo/src/gfx.c:16, from /home/buffi/Arduino/libraries/ugfx-repo/src/gfx_mk.c:8, from /home/buffi/Arduino/libraries/ugfx-arduino/ugfx-arduino.c:1: /home/buffi/Arduino/libraries/ugfx-repo/src/../src/gos/gos_arduino.h:34:1: error: unknown type name 'bool' typedef bool bool_t; third line from end: ugfx-arduino.c includes ugfx/src/gfx_mk.c and does nothing else. gos_arduino.h has this typedef (line 34): typedef bool bool_t; bool, however, is a C++ type and a strict compiler doesn't know it when compiling C code, which gfx_mk is. Turning ugfx-arduino.c into a C++ file by chaning the extension doesn't solve the problem: In file included from /home/buffi/Arduino/libraries/ugfx-repo/src/gos/gos_mk.c:8:0, from /home/buffi/Arduino/libraries/ugfx-repo/src/gfx_mk.c:9, from /home/buffi/Arduino/libraries/ugfx-arduino/ugfx-arduino.cpp:1: /home/buffi/Arduino/libraries/ugfx-repo/src/gos/gos_arduino.c:28:4: warning: #warning "GOS: Arduino - Make sure you initialize your hardware and the C runtime before calling gfxInit() in your application!" [-Wcpp] #warning "GOS: Arduino - Make sure you initialize your hardware and the C runtime before calling gfxInit() in your application!" ^ In file included from /home/buffi/Arduino/libraries/ugfx-repo/src/gos/gos_mk.c:18:0, from /home/buffi/Arduino/libraries/ugfx-repo/src/gfx_mk.c:9, from /home/buffi/Arduino/libraries/ugfx-arduino/ugfx-arduino.cpp:1: /home/buffi/Arduino/libraries/ugfx-repo/src/gos/gos_x_threads.c: In function 'void _gfxXSwitch(thread*, thread*, bool_t)': /home/buffi/Arduino/libraries/ugfx-repo/src/gos/gos_x_threads.c:378:25: error: invalid conversion from 'void*' to 'int*' [-fpermissive] if (CXT_SAVE(oldt->cxt)) return; ^ In file included from /home/buffi/builds/arduino/arduino-1.6.6/hardware/tools/arm/arm-none-eabi/include/stdlib.h:11:0, from /home/buffi/builds/arduino/arduino-1.6.6/hardware/teensy/avr/cores/teensy3/WProgram.h:4, from /home/buffi/builds/arduino/arduino-1.6.6/hardware/teensy/avr/cores/teensy3/Arduino.h:1, from /home/buffi/Arduino/libraries/ugfx-repo/src/../src/gos/gos_arduino.h:28, from /home/buffi/Arduino/libraries/ugfx-repo/src/../src/gos/gos.h:476, from /home/buffi/Arduino/libraries/ugfx-repo/src/../gfx.h:191, from /home/buffi/Arduino/libraries/ugfx-repo/src/gfx.c:16, from /home/buffi/Arduino/libraries/ugfx-repo/src/gfx_mk.c:8, from /home/buffi/Arduino/libraries/ugfx-arduino/ugfx-arduino.cpp:1: /home/buffi/builds/arduino/arduino-1.6.6/hardware/tools/arm/arm-none-eabi/include/setjmp.h:15:5: error: initializing argument 1 of 'int setjmp(int*)' [-fpermissive] int _EXFUN(setjmp,(jmp_buf __jmpb)); ^ In file included from /home/buffi/Arduino/libraries/ugfx-repo/src/gos/gos_mk.c:18:0, from /home/buffi/Arduino/libraries/ugfx-repo/src/gfx_mk.c:9, from /home/buffi/Arduino/libraries/ugfx-arduino/ugfx-arduino.cpp:1: /home/buffi/Arduino/libraries/ugfx-repo/src/gos/gos_x_threads.c:385:26: error: invalid conversion from 'void*' to 'int*' [-fpermissive] if (CXT_SAVE(newt->cxt)) { ^ In file included from /home/buffi/builds/arduino/arduino-1.6.6/hardware/tools/arm/arm-none-eabi/include/stdlib.h:11:0, from /home/buffi/builds/arduino/arduino-1.6.6/hardware/teensy/avr/cores/teensy3/WProgram.h:4, from /home/buffi/builds/arduino/arduino-1.6.6/hardware/teensy/avr/cores/teensy3/Arduino.h:1, from /home/buffi/Arduino/libraries/ugfx-repo/src/../src/gos/gos_arduino.h:28, from /home/buffi/Arduino/libraries/ugfx-repo/src/../src/gos/gos.h:476, from /home/buffi/Arduino/libraries/ugfx-repo/src/../gfx.h:191, from /home/buffi/Arduino/libraries/ugfx-repo/src/gfx.c:16, from /home/buffi/Arduino/libraries/ugfx-repo/src/gfx_mk.c:8, from /home/buffi/Arduino/libraries/ugfx-arduino/ugfx-arduino.cpp:1: /home/buffi/builds/arduino/arduino-1.6.6/hardware/tools/arm/arm-none-eabi/include/setjmp.h:15:5: error: initializing argument 1 of 'int setjmp(int*)' [-fpermissive] int _EXFUN(setjmp,(jmp_buf __jmpb)); ^ In file included from /home/buffi/Arduino/libraries/ugfx-repo/src/gos/gos_mk.c:18:0, from /home/buffi/Arduino/libraries/ugfx-repo/src/gfx_mk.c:9, from /home/buffi/Arduino/libraries/ugfx-arduino/ugfx-arduino.cpp:1: /home/buffi/Arduino/libraries/ugfx-repo/src/gos/gos_x_threads.c:403:27: error: invalid conversion from 'void*' to 'int*' [-fpermissive] CXT_RESTORE(newt->cxt, 1); ^ In file included from /home/buffi/builds/arduino/arduino-1.6.6/hardware/tools/arm/arm-none-eabi/include/stdlib.h:11:0, from /home/buffi/builds/arduino/arduino-1.6.6/hardware/teensy/avr/cores/teensy3/WProgram.h:4, from /home/buffi/builds/arduino/arduino-1.6.6/hardware/teensy/avr/cores/teensy3/Arduino.h:1, from /home/buffi/Arduino/libraries/ugfx-repo/src/../src/gos/gos_arduino.h:28, from /home/buffi/Arduino/libraries/ugfx-repo/src/../src/gos/gos.h:476, from /home/buffi/Arduino/libraries/ugfx-repo/src/../gfx.h:191, from /home/buffi/Arduino/libraries/ugfx-repo/src/gfx.c:16, from /home/buffi/Arduino/libraries/ugfx-repo/src/gfx_mk.c:8, from /home/buffi/Arduino/libraries/ugfx-arduino/ugfx-arduino.cpp:1: /home/buffi/builds/arduino/arduino-1.6.6/hardware/tools/arm/arm-none-eabi/include/setjmp.h:14:6: error: initializing argument 1 of 'void longjmp(int*, int)' [-fpermissive] void _EXFUN(longjmp,(jmp_buf __jmpb, int __retval)); ^ In file included from /home/buffi/Arduino/libraries/ugfx-repo/src/gos/gos_mk.c:18:0, from /home/buffi/Arduino/libraries/ugfx-repo/src/gfx_mk.c:9, from /home/buffi/Arduino/libraries/ugfx-arduino/ugfx-arduino.cpp:1: /home/buffi/Arduino/libraries/ugfx-repo/src/gos/gos_x_threads.c: In function 'threadreturn_t gfxThreadWait(gfxThreadHandle)': /home/buffi/Arduino/libraries/ugfx-repo/src/gos/gos_x_threads.c:650:4: error: invalid conversion from 'gfxThreadHandle {aka void*}' to 'thread*' [-fpermissive] t = th; ^ In file included from /home/buffi/Arduino/libraries/ugfx-repo/src/gdriver/gdriver.c:12:0, from /home/buffi/Arduino/libraries/ugfx-repo/src/gdriver/gdriver_mk.c:8, from /home/buffi/Arduino/libraries/ugfx-repo/src/gfx_mk.c:10, from /home/buffi/Arduino/libraries/ugfx-arduino/ugfx-arduino.cpp:1: /home/buffi/Arduino/libraries/ugfx-repo/src/gdriver/gdriver.h: At global scope: /home/buffi/Arduino/libraries/ugfx-repo/src/gdriver/gdriver.h:90:33: error: duplicate 'const' typedef const struct GDriverVMT const GDriverVMTList[1]; ^ In file included from /home/buffi/Arduino/libraries/ugfx-repo/src/gdriver/gdriver_mk.c:8:0, from /home/buffi/Arduino/libraries/ugfx-repo/src/gfx_mk.c:10, from /home/buffi/Arduino/libraries/ugfx-arduino/ugfx-arduino.cpp:1: /home/buffi/Arduino/libraries/ugfx-repo/src/gdriver/gdriver.c: In function 'GDriver* gdriverRegister(const GDriverVMT*, void*)': /home/buffi/Arduino/libraries/ugfx-repo/src/gdriver/gdriver.c:45:28: error: invalid conversion from 'void*' to 'GDriver*' [-fpermissive] pd = gfxAlloc(vmt->objsize); ^ In file included from /home/buffi/Arduino/libraries/ugfx-repo/src/gdisp/gdisp_mk.c:21:0, from /home/buffi/Arduino/libraries/ugfx-repo/src/gfx_mk.c:12, from /home/buffi/Arduino/libraries/ugfx-arduino/ugfx-arduino.cpp:1: /home/buffi/Arduino/libraries/ugfx-repo/src/gdisp/gdisp.c: In function 'void _gdispInit()': /home/buffi/Arduino/libraries/ugfx-repo/src/gdisp/gdisp.c:585:26: error: duplicate 'const' extern const GDISPVMT const GDISPVMT_OnlyOne[1]; ^ Tons of invalid pointer-to-pointer conversion errors. I got better results when compiling for os RAW32. In that case only a few utility functions aren't known to the linker (like gfxSleepMilliseconds). RAW32 uses unsigned char as bool_t. Using unsigned char as bool_t in gos_arduino.h seems to be fine, the code compiles. I haven't tested it with hardware yet. So there should be a way of either using gfx_mk.c included in a C++ file to get access to bool, or change the bool_t typedef for os arduino. Regards Christoph
  11. Progress is here: https://hackaday.io/project/8539-using-ugfx-in-arduino I'll sum it up here when I'm satisfied with the result, with a clear example,
  12. I'm currently experimenting a bit with arduino and ugfx and I'll post my results here when I know what's possible.
  13. I've tried it and it basically works (compiles, that is). However, in order to be able to keep ugfx configurations for different projects separated, Arduino must be tricked into selecting the right "installation" of ugfx. Some remarks about that are here (posts #20 and #21): https://forum.pjrc.com/threads/26535-uG ... #post88929 It might be possible to make an even cleaner approach by separating ugfx from a project-specific configuration and the low-level drivers. I'll try that later. Regards Christoph
  14. Compiling as a single file indeed makes life much easier. I also found that compilation is sped up considerably. Thank you!
  15. Hi, I checked out ugfx yesterday and first tried the new "single file" mode of compilation, which worked great. Thanks for that! However, some problems: I'm compiling for an STM32F030F4P6, which has only 16kB flash. With ugfx 2.3, it's almost full. With the latest github (checked out 20150615) I can't squeeze it below some 70 kB (!). It's well possible that there's something wrong with my compiler and linker setup, though, but it happens when compiling ugfx as a single file and in the "old" way with many individual source files. When including ugfx in a C++ project, it redefines types such as uint16_t. I had to comment that out. With 2.3, I could solve that by simply rearranging headers, but not any more. I found a suspicious commit here: https://bitbucket.org/Tectu/ugfx/diff/src/gos/gos_raw32.h?diff2=81850ade15e7&at=master. Regards Christoph
×
×
  • Create New...