0
votes

I'm making a cusermod for Micropython, and I'm trying to store a number in hex format in a string. I tried using sprintf however, my compiler is telling me that it's undefined. I imported stdio.h, string.h as well as some other libraries required to develop cusermods for STM32 chips, yet I van't figure out why sprintf isn't defined??? Has anyone had a similar issue and have any idea how to solve it?

What specific compiler are you using and how did you install it? I think you should show us your full code, the command you are using to compile it, and the exact error message you are getting. ARM toolchains usually come with a C library that provides sprintf in my experience.David Grayson
@DavidGrayson Using GCC and GDB and installed them through MSYS2 MinGW. I'm building in cygdrive terminal using the latest version of micropython with the command make BOARD=XX USER_C_MODULES=../../../modules, here is the makefile. And this is the error message! C:\msys64\mingw64\bin\arm-none-eabi-ld.exe: build-KAIROS/kairos_GPSL70/gpsL70.o: in function gpshide_init': gpsL70.c:(.text.gpshide_init+0x5c): undefined reference to sprintf' make: *** [Makefile:689: build-KAIROS/firmware.elf] Error 1aaa