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

@ -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);