Toolchain update, 4.7.2 to 4.8.4

Opps, there's a bug on line 107 in usb_serial.h. Looks at it now, I'm honestly not sure how this ever worked.

Change this:

Code:
#else  // F_CPU < 20 MHz && !(USB_SERIAL || USB_SERIAL_HID)

to this:

Code:
#elif  (F_CPU < 20000000) && (defined(USB_SERIAL) || defined(USB_SERIAL_HID))
 
When comparing the compiled code size and ram usage, with the same sketch, it's important to also mention which USB Type is selected. Different USB support causes different code to be compiled into the USB stack, and a different number of USB buffers to be allocated.

The numbers I posted previously were for "USB Serial", which is the default for that menu.
 
Using Arduino 1.0.6 and Win 7
The simple 'ILI9341 flicker test' sketch below worked in 1.20 but now it now it prints garbage below the first line.
It appears to be a problem with 'printf'.
-----------------------------------------------------------------------------------------------------------------------
#include "SPI.h"
#include "ILI9341_t3.h"
#include <MsTimer2.h>


#define TFT_DC 9
#define TFT_CS 10

ILI9341_t3 tft = ILI9341_t3(TFT_CS, TFT_DC);

volatile int n1 = 0;
volatile float f1 = 0.0;

void setup()
{
tft.begin();
tft.fillScreen(ILI9341_BLACK);
tft.setTextSize(3);
tft.setTextColor(ILI9341_YELLOW);
tft.setCursor(0,0);
tft.print("FLICKER TEST:");
tft.setTextSize(5);
//tft.setTextColor(ILI9341_WHITE, ILI9341_BLACK);

MsTimer2::set(10, donums); // 10ms period
MsTimer2::start();
}


void donums()
{
n1 += 1;
if(n1 == 10001) n1 = 0;

f1 += .01;
if(f1 >= 100.01) f1 = 0.00;

}


void loop(void)
{
tft.setTextColor(ILI9341_WHITE, ILI9341_BLACK);

tft.setCursor(0,60);
tft.printf("%5d",n1);

tft.setCursor(0,120);
tft.printf("%6.2f",f1);

}
-----------------------------------------------------------------------------------------------------------------------


EDIT: 'printf' is the problem.....I tried using a 'Serial.prinf("%xd",x)' statement and nothing gets printed to the IDE terminal.
 
Last edited:
malloc-trim

c:/arduino/hardware/tools/arm/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7e-m\libc_s.a(lib_a-mtrim.o): In function `malloc_trim':
mtrim.c:(.text.malloc_trim+0x6): undefined reference to `_malloc_trim_r'
collect2.exe: error: ld returned 1 exit status


I have #include <malloc.h>. Do i have to include more,
or is there something wrong with malloc_trim() ?

Regards, Frank
 
Back
Top