I am using Microchip board SAMA5D27-SOM1
I am building "buildroot" by refering below showed link
()
I would like to add gcc or compiler to run c program related to libusb in that.How to add gcc or other compiler during building.
I am using Microchip board SAMA5D27-SOM1
I am building "buildroot" by refering below showed link
()
I would like to add gcc or compiler to run c program related to libusb in that.How to add gcc or other compiler during building.
Short answer: Buildroot intentionally does not put a native compiler or development headers on the target image — it’s designed for cross‑building on your host. For a SAMA5D27‑SOM1 you should include the libusb runtime in the target and use the Buildroot‑generated cross‑toolchain or SDK to compile your C code on the host, then copy the binary to the board. This is the Buildroot design and recommended workflow. (buildroot.org)
Practical steps (safe, repeatable workflow):
make menuconfig and enable the correct Target Architecture for the SAMA5D27 (Cortex‑A5) and select the libusb package under Target packages → Hardware handling (BR2_PACKAGE_LIBUSB). You can also enable the libusb examples option so Buildroot installs prebuilt examples into the image. make (or rebuild). Use the Buildroot toolchain for cross‑compiling: list the compiler with ls output/host/bin/*gcc and compile on your host with the found triplet, e.g. output/host/bin/<triplet>-gcc myprog.c -o myprog -lusb-1.0. Alternatively run make sdk to produce an SDK tarball you can unpack and use. (lists.buildroot.org)If you really need to compile on the board (not recommended): use a fuller distribution or an SDK that provides package management (Debian/Ubuntu rootfs or a custom SDK image), or install a toolchain and dev packages on target — but that defeats Buildroot’s small‑footprint purpose. Microchip also publishes SOM resources and BSPs for SAMA5D27 that may include prebuilt images or SDKs; contacting Microchip support/FEs (as suggested) is reasonable if you need an official SDK/image. (buildroot.org)
Troubleshooting tips:
output/host/bin/ and use that exact gcc. ldd/library paths and ABI (glibc vs musl) to ensure the binary and target libc match. ()I'd call up Microchip's Field Engineers for this one. From Microchip's page:
Extensive Ecosystem:
Free Linux® distributions
MPLAB X Integrated Development Environment
MPLAB Harmony 3
Complete set of C examples for bare metal users
Multiple third-party software and hardware partners
You'll likely have to ask about that last item. Folk I know stick with MicroChip's dev kits and offerings.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.