Description
My issue is quite similar to I have no text on the button label since I am also unable to draw text on my display.
So far I implemented a driver (not perfect, but I have something on my display) and got everything compiling.
What MCU/Processor/Board and compiler are you using?
The controller is a Philips LPC1788 and I am using a (heavy modified?) GCC toolchain (based on Mentor Sourcery)
The controller already has a “base” firmware that handles some background tasks. (Not going to name any brands).
What do you want to achieve?
Get some text on the labels/buttons.
What have you tried so far?
Enable the logging. However this resulted in issues in the toolchain that I was unable to resolve. (So I don’t have any logging (yet)).
Increase the stack size, however the compiler/linker does not seem to have an option for this.
Below the output of ld.exe --help
Usage: C:\COMMONS\C\armgcc2\arm-none-eabi\bin\ld.exe [options] file...
Options:
-a KEYWORD Shared library control for HP/UX compatibility
-A ARCH, --architecture ARCH
Set architecture
-b TARGET, --format TARGET Specify target for following input files
-c FILE, --mri-script FILE Read MRI format linker script
-d, -dc, -dp Force common symbols to be defined
-e ADDRESS, --entry ADDRESS Set start address
-E, --export-dynamic Export all dynamic symbols
--no-export-dynamic Undo the effect of --export-dynamic
-EB Link big-endian objects
-EL Link little-endian objects
-f SHLIB, --auxiliary SHLIB Auxiliary filter for shared object symbol table
-F SHLIB, --filter SHLIB Filter for shared object symbol table
-g Ignored
-G SIZE, --gpsize SIZE Small data size (if no size, same as --shared)
-h FILENAME, -soname FILENAME
Set internal name of shared library
-I PROGRAM, --dynamic-linker PROGRAM
Set PROGRAM as the dynamic linker to use
-l LIBNAME, --library LIBNAME
Search for library LIBNAME
-L DIRECTORY, --library-path DIRECTORY
Add DIRECTORY to library search path
--sysroot=<DIRECTORY> Override the default sysroot location
-m EMULATION Set emulation
-M, --print-map Print map file on standard output
-n, --nmagic Do not page align data
-N, --omagic Do not page align data, do not make text readonly
--no-omagic Page align data, make text readonly
-o FILE, --output FILE Set output file name
-O Optimize output file
-plugin PLUGIN Load named plugin
-plugin-opt ARG Send arg to last-loaded plugin
-flto Ignored for GCC LTO option compatibility
-flto-partition= Ignored for GCC LTO option compatibility
-fuse-ld= Ignored for GCC linker option compatibility
-Qy Ignored for SVR4 compatibility
-q, --emit-relocs Generate relocations in final output
-r, -i, --relocatable Generate relocatable output
-R FILE, --just-symbols FILE
Just link symbols (if directory, same as --rpath)
-s, --strip-all Strip all symbols
-S, --strip-debug Strip debugging symbols
--strip-discarded Strip symbols in discarded sections
--no-strip-discarded Do not strip symbols in discarded sections
-t, --trace Trace file opens
-T FILE, --script FILE Read linker script
--default-script FILE, -dT Read default linker script
-u SYMBOL, --undefined SYMBOL
Start with undefined reference to SYMBOL
--unique [=SECTION] Don't merge input [SECTION | orphan] sections
-Ur Build global constructor/destructor tables
-v, --version Print version information
-V Print version and emulation information
-x, --discard-all Discard all local symbols
-X, --discard-locals Discard temporary local symbols (default)
--discard-none Don't discard any local symbols
-y SYMBOL, --trace-symbol SYMBOL
Trace mentions of SYMBOL
-Y PATH Default search path for Solaris compatibility
-(, --start-group Start a group
-), --end-group End a group
--accept-unknown-input-arch Accept input files whose architecture cannot be determined
--no-accept-unknown-input-arch
Reject input files whose architecture is unknown
--as-needed Only set DT_NEEDED for following dynamic libs if used
--no-as-needed Always set DT_NEEDED for dynamic libraries mentioned on
the command line
-assert KEYWORD Ignored for SunOS compatibility
-Bdynamic, -dy, -call_shared
Link against shared libraries
-Bstatic, -dn, -non_shared, -static
Do not link against shared libraries
-Bsymbolic Bind global references locally
-Bsymbolic-functions Bind global function references locally
--check-sections Check section addresses for overlaps (default)
--no-check-sections Do not check section addresses for overlaps
--copy-dt-needed-entries Copy DT_NEEDED links mentioned inside DSOs that follow
--no-copy-dt-needed-entries Do not copy DT_NEEDED links mentioned inside DSOs that follow
--cref Output cross reference table
--defsym SYMBOL=EXPRESSION Define a symbol
--demangle [=STYLE] Demangle symbol names [using STYLE]
--embedded-relocs Generate embedded relocs
--fatal-warnings Treat warnings as errors
--no-fatal-warnings Do not treat warnings as errors (default)
-fini SYMBOL Call SYMBOL at unload-time
--force-exe-suffix Force generation of file with .exe suffix
--gc-sections Remove unused sections (on some targets)
--no-gc-sections Don't remove unused sections (default)
--print-gc-sections List removed unused sections on stderr
--no-print-gc-sections Do not list removed unused sections
--hash-size=<NUMBER> Set default hash table size close to <NUMBER>
--help Print option help
-init SYMBOL Call SYMBOL at load-time
-Map FILE Write a map file
--no-define-common Do not define Common storage
--no-demangle Do not demangle symbol names
--no-keep-memory Use less memory and more disk I/O
--no-undefined Do not allow unresolved references in object files
--allow-shlib-undefined Allow unresolved references in shared libraries
--no-allow-shlib-undefined Do not allow unresolved references in shared libs
--allow-multiple-definition Allow multiple definitions
--no-undefined-version Disallow undefined version
--default-symver Create default symbol version
--default-imported-symver Create default symbol version for imported symbols
--no-warn-mismatch Don't warn about mismatched input files
--no-warn-search-mismatch Don't warn on finding an incompatible library
--no-whole-archive Turn off --whole-archive
--noinhibit-exec Create an output file even if errors occur
-nostdlib Only use library directories specified on
the command line
--oformat TARGET Specify target of output file
--print-output-format Print default output format
-qmagic Ignored for Linux compatibility
--reduce-memory-overheads Reduce memory overheads, possibly taking much longer
--relax Reduce code size by using target specific optimizations
--no-relax Do not use relaxation techniques to reduce code size
--retain-symbols-file FILE Keep only symbols listed in FILE
-rpath PATH Set runtime shared library search path
-rpath-link PATH Set link time shared library search path
-shared, -Bshareable Create a shared library
-pie, --pic-executable Create a position independent executable
--sort-common [=ascending|descending]
Sort common symbols by alignment [in specified order]
--sort-section name|alignment
Sort sections by name or maximum alignment
--spare-dynamic-tags COUNT How many tags to reserve in .dynamic section
--split-by-file [=SIZE] Split output sections every SIZE octets
--split-by-reloc [=COUNT] Split output sections every COUNT relocs
--stats Print memory usage statistics
--target-help Display target specific options
--task-link SYMBOL Do task level linking
--traditional-format Use same format as native linker
--section-start SECTION=ADDRESS
Set address of named section
-Tbss ADDRESS Set address of .bss section
-Tdata ADDRESS Set address of .data section
-Ttext ADDRESS Set address of .text section
-Ttext-segment ADDRESS Set address of text segment
-Trodata-segment ADDRESS Set address of rodata segment
-Tldata-segment ADDRESS Set address of ldata segment
--unresolved-symbols=<method>
How to handle unresolved symbols. <method> is:
ignore-all, report-all, ignore-in-object-files,
ignore-in-shared-libs
--verbose [=NUMBER] Output lots of information during link
--version-script FILE Read version information script
--version-exports-section SYMBOL
Take export symbols list from .exports, using
SYMBOL as the version.
--dynamic-list-data Add data symbols to dynamic list
--dynamic-list-cpp-new Use C++ operator new/delete dynamic list
--dynamic-list-cpp-typeinfo Use C++ typeinfo dynamic list
--dynamic-list FILE Read dynamic list
--warn-common Warn about duplicate common symbols
--warn-constructors Warn if global constructors/destructors are seen
--warn-multiple-gp Warn if the multiple GP values are used
--warn-once Warn only once per undefined symbol
--warn-section-align Warn if start of section changes due to alignment
--warn-shared-textrel Warn if shared object has DT_TEXTREL
--warn-alternate-em Warn if an object has alternate ELF machine code
--warn-unresolved-symbols Report unresolved symbols as warnings
--error-unresolved-symbols Report unresolved symbols as errors
--whole-archive Include all objects from following archives
--wrap SYMBOL Use wrapper functions for SYMBOL
--no-poison-system-directories
Do not warn for -L options using system directories
--error-poison-system-directories
Give an error for -L options using system directories
--ignore-unresolved-symbol SYMBOL
Unresolved SYMBOL will not cause an error or warning
@FILE Read options from FILE
C:\COMMONS\C\armgcc2\arm-none-eabi\bin\ld.exe: supported targets: elf32-littlearm elf32-bigarm elf32-little elf32-big plugin srec symbolsrec verilog tekhex binary ihex
C:\COMMONS\C\armgcc2\arm-none-eabi\bin\ld.exe: supported emulations: armelf
C:\COMMONS\C\armgcc2\arm-none-eabi\bin\ld.exe: emulation specific options:
armelf:
--audit=AUDITLIB Specify a library to use for auditing
-Bgroup Selects group name lookup rules for DSO
--build-id[=STYLE] Generate build ID note
-P AUDITLIB, --depaudit=AUDITLIB
Specify a library to use for auditing dependencies
--shared-comdat Use comdat groups from shared objects
--disable-new-dtags Disable new dynamic tags
--enable-new-dtags Enable new dynamic tags
--eh-frame-hdr Create .eh_frame_hdr section
--exclude-libs=LIBS Make all symbols in LIBS hidden
--hash-style=STYLE Set hash style to sysv, gnu or both
-z combreloc Merge dynamic relocs into one section and sort
-z common-page-size=SIZE Set common page size to SIZE
-z defs Report unresolved symbols in object files.
-z execstack Mark executable as requiring executable stack
-z global Make symbols in DSO available for subsequently
loaded objects
-z initfirst Mark DSO to be initialized first at runtime
-z interpose Mark object to interpose all DSOs but executable
-z lazy Mark object lazy runtime binding (default)
-z loadfltr Mark object requiring immediate process
-z max-page-size=SIZE Set maximum page size to SIZE
-z muldefs Allow multiple definitions
-z nocombreloc Don't merge dynamic relocs into one section
-z nocopyreloc Don't create copy relocs
-z nodefaultlib Mark object not to use default search paths
-z nodelete Mark DSO non-deletable at runtime
-z nodlopen Mark DSO not available to dlopen
-z nodump Mark DSO not available to dldump
-z noexecstack Mark executable as not requiring executable stack
-z norelro Don't create RELRO program header
-z now Mark object non-lazy runtime binding
-z origin Mark object requiring immediate $ORIGIN
processing at runtime
-z relro Create RELRO program header
-z stacksize=SIZE Set size of stack segment
--thumb-entry=<sym> Set the entry point to be Thumb symbol <sym>
--be8 Output BE8 format image
--target1-rel Interpret R_ARM_TARGET1 as R_ARM_REL32
--target1-abs Interpret R_ARM_TARGET1 as R_ARM_ABS32
--target2=<type> Specify definition of R_ARM_TARGET2
--fix-v4bx Rewrite BX rn as MOV pc, rn for ARMv4
--fix-v4bx-interworking Rewrite BX rn branch to ARMv4 interworking veneer
--use-blx Enable use of BLX instructions
--vfp11-denorm-fix Specify how to fix VFP11 denorm erratum
--no-enum-size-warning Don't warn about objects with incompatible
enum sizes
--no-wchar-size-warning Don't warn about objects with incompatible
wchar_t sizes
--pic-veneer Always generate PIC interworking veneers
--stub-group-size=N Maximum size of a group of input sections that
can be handled by one stub section. A negative
value locates all stubs after their branches
(with a group size of -N), while a positive
value allows two groups of input sections, one
before, and one after each stub section.
Values of +/-1 indicate the linker should
choose suitable defaults.
--[no-]fix-cortex-a8 Disable/enable Cortex-A8 Thumb-2 branch erratum fix
--no-merge-exidx-entries Disable merging exidx entries
--[no-]fix-arm1176 Disable/enable ARM1176 BLX immediate erratum fix
A note about the option -z stacksize=SIZE
. This is only for emulation, if I add this to the linker arguments ld simply ignores it.
Code to reproduce
The current version of lv_example_get_started_1 (added the line and added the pictures)
void lv_example_get_started_1_img(void)
{
/*Change the active screen's background color*/
lv_obj_set_style_bg_color(lv_scr_act(), lv_color_hex(0x852478), LV_PART_MAIN);
/*Create a white label, set its text and align it to the center*/
lv_obj_t * label = lv_label_create(lv_scr_act());
lv_label_set_text(label, "Hello world");
lv_obj_set_style_text_color(lv_scr_act(), lv_color_hex(0xffffff), LV_PART_MAIN);
lv_obj_align(label, LV_ALIGN_TOP_MID, 0, 0);
/*Create an array for the points of the line*/
static lv_point_t line_points[] = { {5, 5}, {70, 70}, {120, 10}, {180, 60}, {240, 10} };
/*Create style*/
static lv_style_t style_line;
lv_style_init(&style_line);
lv_style_set_line_width(&style_line, 8);
lv_style_set_line_color(&style_line, lv_palette_main(LV_PALETTE_BLUE));
lv_style_set_line_rounded(&style_line, true);
/*Create a line and apply the new style*/
lv_obj_t * line1;
line1 = lv_line_create(lv_scr_act());
lv_line_set_points(line1, line_points, 5); /*Set the points*/
lv_obj_add_style(line1, &style_line, 0);
lv_obj_center(line1);
lv_obj_t * img1 = lv_img_create(lv_scr_act());
lv_img_set_src(img1, &windowClosed);
lv_obj_align(img1, LV_ALIGN_TOP_LEFT, 0, 0);
lv_obj_t * img2 = lv_img_create(lv_scr_act());
lv_img_set_src(img2, &windowClosedEnabled);
lv_obj_align(img2, LV_ALIGN_TOP_RIGHT, 0, 0);
lv_obj_t * img3 = lv_img_create(lv_scr_act());
lv_img_set_src(img3, &windowOpen);
lv_obj_align(img3, LV_ALIGN_BOTTOM_LEFT, 0, 0);
lv_obj_t * img4 = lv_img_create(lv_scr_act());
lv_img_set_src(img4, &windowOpenEnabled);
lv_obj_align(img4, LV_ALIGN_BOTTOM_RIGHT, 0, 0);
}
Screenshot and/or video
Other things
Note: The “default” links lead to pages that don’t exist.
hxxps://docs.littlevgl.com/en/html/index.html#faq and hxxps://docs.littlevgl.com/en/html/get-started/quick-overview.html (hxxps to get around the 3 link limit)