Deep Dive w/Scott: Building CircuitPython with clang #adafruit #circuitpython #llvm #clang
Join Scott as he works on getting CircuitPython building under the clang compiler, talks clang related tooling and answers questions.
Visit the Adafruit shop online - http://www.adafruit.com
Thanks to dcd for time codes!
0:54 Welcome
1:51 Let's get started and introduction to Deep Dive
4:20 Next Week - Deep Dive with Tim
6:00 Zepher development summint in Seattle next week
6:30 USB Host work wrapped up - going into 9.1 beta
7:15 Next on radar BLE support on ESP32-S3 ( C as well )
7:50 Building Circuit Python with CLang ( part of LLVM project )
9:10 clangd language server
9:52 clang vs CP
10:55 compiling RP2040 CP with clang
12:22 Sublime Text cursor bug fixed! (KWin wayland bug 464196 )
14:15 Smarter help from clangd and sublime text
14:55 inline hints ( inlay hints / https://clangd.llvm.org/extensions#inlay-hints )
16:44 Copilot
19:05 compile_commands.json https://clang.llvm.org/docs/JSONCompilationDatabase.html
19:55 bear make / clang compile commands https://github.com/rizsotto/Bear
24:20 rp2040 scratch x/y memory regions
24:56 rp2040 memory map
28:30 clang18 / rebase / reflog - check the laptop :-)
30:46 hunt for the uncomitted changes on the laptop
31:43 need python script to built pico libc
32:56 build stage 2 using clang
33:12 resolving link errors -lc -lm -lclang_rt.builtins-arm
34:29 makefile flag MICROPY_BUILD_CLANG
36:00 copilot autocompletion examples
37:00 resolve SRAM overflow by 8 bytes /discard
43:20 fixing problems in submodules / disable #pragmas for clang code
46:30 Q: Can that still be overloaded (the -O3 as part of a GCC define) if you wanted it differently optimised or debug etc
46:40 fix TinyUSB bug
47:18 tusb_compiler.h
50:00 __force_inline implies inline
51:56 fixes in submodules sometimes need to be fixed again
52:15 add __attribute__((fallthrough))
53:18 git merge embedded_build / almost linked
55:27 clang assumes you you have prebuild libraries
56:00 python lib/build_picolibc.py
56:55 fix build_picolibc.py for rp2040
58:05 https://github.com/tannewt/circuitpython/tree/embedded_build
59:20 picolibc build with meson and ninja
1:00:45 similar to asyncio in honcho - continue with build_picolibc.py
1:06:20 consider adding the output directory
1:08:30 or maybe just try to get it working
1:14:01 review meson-logs/meson-log.txt for compile errors
1:15:20 continue enhancing build_picolibc.py for compiler/version/target (w/copilot)
1:28:25 resolve malloc requirements - investigate functions sections
1:37:18 -Wl,-y,malloc
1:39:56 maybe turn off CIRCUITPY_USB_HOST
1:41:43 FLASH gigantic overflow!
1:48:23 it links now but still huge
2:01:19 wrap up - after fixing uninitialized section
-----------------------------------------
LIVE CHAT IS HERE! http://adafru.it/discord
Subscribe to Adafruit on YouTube: http://adafru.it/subscribe
New tutorials on the Adafruit Learning System: http://learn.adafruit.com/
-----------------------------------------