I’m currently integrating MicroPython into my Zephyr-based firmware using the nRF Connect SDK 2.9.0. I’ve encountered a build issue due to duplicate definitions arising from the FATFS implementation. Specifically, there are two different sets of FATFS source files:
- MicroPython’s FATFS:
Located in
micropython/lib/oofatfs/ff.c
and its corresponding header ff.h. - Zephyr’s FATFS:
Found in
modules/fs/fatfs/ff.c
(and the corresponding header) provided by Zephyr.
These two implementations both provide functions such as f_mount()
, leading to duplicate symbol errors when I try to build my firmware.
The firmware is relatively complex, so I don't want to break something by using one implementation or the other. Is there a recommended method for resolving these duplicate symbol conflicts? Alternatively, is there a way to isolate one implementation (for example, building MicroPython as a separate static library or “namespacing” its FATFS functions) so that both can coexist without conflict?