Skip to content

Instantly share code, notes, and snippets.

@lupyuen
Created July 9, 2022 03:59
Show Gist options
  • Save lupyuen/86298a99cb87b43ac568c19daeb4081a to your computer and use it in GitHub Desktop.
Save lupyuen/86298a99cb87b43ac568c19daeb4081a to your computer and use it in GitHub Desktop.
$ pushd zig-lvgl-nuttx
$ zig build-obj -femit-llvm-ir -femit-llvm-bc -femit-analysis --verbose-cimport -target riscv32-freestanding-none -mcpu=baseline_rv32-d -isystem /home/user/nuttx/nuttx/include -I /home/user/nuttx/apps/graphics/lvgl -I /home/user/nuttx/apps/graphics/lvgl/lvgl -I /home/user/nuttx/apps/include -I /home/user/nuttx/apps/examples/lvgltest lvgltest.zig
info(compilation): C import source: zig-cache/o/64a1cd9416c7966dcf19b52fea31b232/cimport.h
info(compilation): C import .d file: zig-cache/o/64a1cd9416c7966dcf19b52fea31b232/cimport.h.d
info(compilation): C import output: zig-cache/o/6cdfaaf724b4d9cc9a15817558886c0c/cimport.zig
$ xxd -c 1 lvgltest.o \
| sed 's/00000024: 01/00000024: 03/' \
| xxd -r -c 1 - lvgltest2.o
$ cp lvgltest2.o lvgltest.o
$ cp lvgltest.o /home/user/nuttx/apps/examples/lvgltest/lvgltest.c.home.user.nuttx.apps.examples.lvgltest.o
$ ls -l /home/user/nuttx/apps/examples/lvgltest/lvgltest.c.home.user.nuttx.apps.examples.lvgltest.o
-rw-r--r-- 1 user user 142660 Jul 9 11:57 /home/user/nuttx/apps/examples/lvgltest/lvgltest.c.home.user.nuttx.apps.examples.lvgltest.o
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment