I can't get this code to compile to Pro Trinket 5v16Mhz (USB)

I was able to upload this code to Arduino UNO no problem, however now it will not compile for Pro Trinket 5V/16Mhz (USB) even when Verifying:

Arduino: 1.8.20 Hourly Build 2022/04/25 09:35 (Mac OS X), Board: "Pro Trinket 5V/16MHz (USB)"

#include <malloc.h> // memalign() function -> candidates: []

      ^~~~~~~~~~

compilation terminated.
Using library Adafruit_NeoPixel at version 1.10.5 in folder: /Users/billynoble/Documents/Arduino/libraries/Adafruit_NeoPixel
Using library Arduino_Low_Power at version 1.2.2 in folder: /Users/billynoble/Documents/Arduino/libraries/Arduino_Low_Power
Using library Adafruit_DMA_neopixel_library at version 1.1.1 in folder: /Users/billynoble/Documents/Arduino/libraries/Adafruit_DMA_neopixel_library
Using library Adafruit_Zero_DMA_Library at version 1.1.0 in folder: /Users/billynoble/Documents/Arduino/libraries/Adafruit_Zero_DMA_Library
Using library SPI at version 1.0 in folder: /Users/billynoble/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/libraries/SPI
exit status 1
Error compiling for board Pro Trinket 5V/16MHz (USB).

different CPU - different memory allocation?

I'm not entirely sure how I would change that. I have all of the drivers installed, however it still wont compile the code for the Trinket even if it's just to verify

Most likely, the board definition you have is not current, or the libraries are not current. Try updating the boards and libraries in Preferences.

Since the board is an Adafruit product, you are more likely to get useful help on the Adafruit forum.

In any case, use of malloc() is not recommended.

@billygemini, your topic has been moved to a more suitable location on the forum.

That's why Adafruit uses it in their NeoPixel library :slight_smile:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.