libc: Redefine int32_t/uint32_t as 'int' not 'long'

libc built from projectgus/newlib-xtensa@0077776963

Closes #42
This commit is contained in:
Angus Gratton 2015-09-05 12:54:09 +10:00
parent 920ee8bf85
commit 7ed064a750
10 changed files with 18 additions and 186 deletions

View file

@ -73,7 +73,7 @@ void bmp180_task(void *pvParameters)
bmp180_trigger_measurement(com_queue);
break;
case MY_EVT_BMP180:
printf("%s: Received BMP180 Event temp:=%ld.%d°C press=%ld.%02ldhPa\n", __FUNCTION__, \
printf("%s: Received BMP180 Event temp:=%d.%d°C press=%d.%02dhPa\n", __FUNCTION__, \
(int32_t)ev.bmp180_data.temperatue, abs((int32_t)(ev.bmp180_data.temperatue*10)%10), \
ev.bmp180_data.pressure/100, ev.bmp180_data.pressure%100 );
break;

View file

@ -34,7 +34,7 @@ void buttonPollTask(void *pvParameters)
{
taskYIELD();
}
printf("Polled for button press at %ldms\r\n", xTaskGetTickCount()*portTICK_RATE_MS);
printf("Polled for button press at %dms\r\n", xTaskGetTickCount()*portTICK_RATE_MS);
vTaskDelay(200 / portTICK_RATE_MS);
}
}
@ -59,7 +59,7 @@ void buttonIntTask(void *pvParameters)
xQueueReceive(*tsqueue, &button_ts, portMAX_DELAY);
button_ts *= portTICK_RATE_MS;
if(last < button_ts-200) {
printf("Button interrupt fired at %ldms\r\n", button_ts);
printf("Button interrupt fired at %dms\r\n", button_ts);
last = button_ts;
}
}

View file

@ -20,8 +20,8 @@ IRAM void dump_frc1_seq(void)
uint32_t f1_a = TIMER(0).COUNT;
uint32_t f1_b = TIMER(0).COUNT;
uint32_t f1_c = TIMER(0).COUNT;
printf("FRC1 sequence 0x%08lx 0x%08lx 0x%08lx\r\n", f1_a, f1_b, f1_c);
printf("FRC1 deltas %ld %ld \r\n", f1_b-f1_a, f1_c-f1_b);
printf("FRC1 sequence 0x%08x 0x%08x 0x%08x\r\n", f1_a, f1_b, f1_c);
printf("FRC1 deltas %d %d \r\n", f1_b-f1_a, f1_c-f1_b);
}
IRAM void dump_frc2_seq(void)
@ -37,8 +37,8 @@ IRAM void dump_frc2_seq(void)
uint32_t f2_a = TIMER(1).COUNT;
uint32_t f2_b = TIMER(1).COUNT;
uint32_t f2_c = TIMER(1).COUNT;
printf("FRC2 sequence 0x%08lx 0x%08lx 0x%08lx\r\n", f2_a, f2_b, f2_c);
printf("FRC2 deltas %ld %ld \r\n", f2_b-f2_a, f2_c-f2_b);
printf("FRC2 sequence 0x%08x 0x%08x 0x%08x\r\n", f2_a, f2_b, f2_c);
printf("FRC2 deltas %d %d \r\n", f2_b-f2_a, f2_c-f2_b);
}
IRAM void dump_timer_regs(const char *msg)
@ -56,7 +56,7 @@ IRAM void dump_timer_regs(const char *msg)
for(int i = 0; i < DUMP_SZ; i++) {
if(i % 4 == 0)
printf("%s0x%02x: ", i ? "\r\n" : "", i*4);
printf("%08lx ", chunk[i]);
printf("%08x ", chunk[i]);
}
printf("\r\n");
@ -77,7 +77,7 @@ static volatile uint32_t frc1_last_count_val;
void timerRegTask(void *pvParameters)
{
while(1) {
printf("state at task tick count %ld:\r\n", xTaskGetTickCount());
printf("state at task tick count %d:\r\n", xTaskGetTickCount());
dump_timer_regs("");
/*
@ -87,10 +87,10 @@ void timerRegTask(void *pvParameters)
printf("INUM_MAX count %d\r\n", max_count);
*/
printf("frc1 handler called %ld times, last value 0x%08lx\r\n", frc1_handler_call_count,
printf("frc1 handler called %d times, last value 0x%08x\r\n", frc1_handler_call_count,
frc1_last_count_val);
printf("frc2 handler called %ld times, last value 0x%08lx\r\n", frc2_handler_call_count,
printf("frc2 handler called %d times, last value 0x%08x\r\n", frc2_handler_call_count,
frc2_last_count_val);
vTaskDelay(500 / portTICK_RATE_MS);

View file

@ -26,7 +26,7 @@ void user_init(void)
printf("Image addresses in flash:\r\n");
for(int i = 0; i <conf.count; i++) {
printf("%c%d: offset 0x%08lx\r\n", i == conf.current_rom ? '*':' ', i, conf.roms[i]);
printf("%c%d: offset 0x%08x\r\n", i == conf.current_rom ? '*':' ', i, conf.roms[i]);
}
struct sdk_station_config config = {

View file

@ -25,7 +25,7 @@ void task2(void *pvParameters)
while(1) {
uint32_t count;
if(xQueueReceive(*queue, &count, 1000)) {
printf("Got %lu\n", count);
printf("Got %u\n", count);
} else {
printf("No msg :(\n");
}