Pinguino IDE V12 System.sleep() function unknow error with OTG

Started by Jiaqiang Yao, September 04, 2017, 01:05:36 PM

Previous topic - Next topic

Jiaqiang Yao

Hi,

I am trying to put the microcontroller in sleep mode and wake up with wachtdog, using Pinguino IDE V12. This is the only version that works for me. However there is a unknow error come from System.sleep() function.

To solve this, i include the system.c manually and i discover that the error comes from // asm volatile ("wait"); // which i do not how to solve it.

I hope you can help me to fix this, thanks so much. Here is the output error:

# ------------------------------------------------------------------

# cleaning all build files

# ------------------------------------------------------------------

rm -f -v /home/yao/Pinguino/v12/source/main32.o

rm -f -v /home/yao/Pinguino/v12/source/main32.elf

rm -f -v /home/yao/Pinguino/v12/source/main32.hex

rm -f -v /home/yao/Pinguino/v12/source/obj/non-free/processor.o

removed '/home/yao/Pinguino/v12/source/obj/non-free/processor.o'

# ------------------------------------------------------------------

# adding proc. definitions

# ------------------------------------------------------------------

cp /home/yao/Pinguino/v12/source/obj/non-free/32MX440F256H.o /home/yao/Pinguino/v12/source/obj/non-free/processor.o

# ------------------------------------------------------------------

# compiling and linking

# /home/yao/Pinguino/v12/source/obj/non-free/usb/libcdc.a\

# /home/yao/Pinguino/v12/source/obj/non-free/usb/libadb.a\

# ------------------------------------------------------------------

#/opt/pinguino/p32/bin/p32-gcc -march=m4k -EL -msoft-float -nostdlib -static -O2 -s -minterlink-mips16 -ffunction-sections -fdata-sections -Wl,--strip-all -Wl,--gc-sections -Wl,-L/home/yao/Pinguino/v12/source/obj/non-free -Wl,-Map=/home/yao/Pinguino/v12/source/output.map -Wl,--defsym,_min_heap_size=512 -D __P32GCC__ -D __PIC32MX__ -D __32MX440F256H__ -D PIC32_PINGUINO_OTG -T/opt/pinguino/v12/p32/lkr/32MX440F256H.ld -T/opt/pinguino/v12/p32/lkr/elf32pic32mx.x -L/home/yao/Pinguino/v12/source/obj/non-free/usb -lm -lgcc -lc -fdollars-in-identifiers -I/opt/pinguino/v12/p32/include/non-free -I/opt/pinguino/v12/p32/include/pinguino/core -I/opt/pinguino/v12/p32/include/pinguino/libraries -I/opt/pinguino/v12/p32/lkr -I/home/yao/Desktop/Inloc/ZigBee_I2C_GPS -I/home/yao/Pinguino/v12/source/obj/non-free -mips16 -S -o /home/yao/Pinguino/v12/source/main32.S /home/yao/Pinguino/v12/source/main32.c

#/opt/pinguino/p32/bin/p32-gcc -march=m4k -EL -msoft-float -nostdlib -static -O2 -s -minterlink-mips16 -ffunction-sections -fdata-sections -Wl,--strip-all -Wl,--gc-sections -Wl,-L/home/yao/Pinguino/v12/source/obj/non-free -Wl,-Map=/home/yao/Pinguino/v12/source/output.map -Wl,--defsym,_min_heap_size=512 -D __P32GCC__ -D __PIC32MX__ -D __32MX440F256H__ -D PIC32_PINGUINO_OTG -T/opt/pinguino/v12/p32/lkr/32MX440F256H.ld -T/opt/pinguino/v12/p32/lkr/elf32pic32mx.x -L/home/yao/Pinguino/v12/source/obj/non-free/usb -lm -lgcc -lc -fdollars-in-identifiers -I/opt/pinguino/v12/p32/include/non-free -I/opt/pinguino/v12/p32/include/pinguino/core -I/opt/pinguino/v12/p32/include/pinguino/libraries -I/opt/pinguino/v12/p32/lkr -I/home/yao/Desktop/Inloc/ZigBee_I2C_GPS -I/home/yao/Pinguino/v12/source/obj/non-free -mips16 -E /home/yao/Pinguino/v12/source/main32.c > /home/yao/Pinguino/v12/source/main32.pp

/opt/pinguino/p32/bin/p32-gcc -march=m4k -EL -msoft-float -nostdlib -static -O2 -s -minterlink-mips16 -ffunction-sections -fdata-sections -Wl,--strip-all -Wl,--gc-sections -Wl,-L/home/yao/Pinguino/v12/source/obj/non-free -Wl,-Map=/home/yao/Pinguino/v12/source/output.map -Wl,--defsym,_min_heap_size=512 -D __P32GCC__ -D __PIC32MX__ -D __32MX440F256H__ -D PIC32_PINGUINO_OTG -T/opt/pinguino/v12/p32/lkr/32MX440F256H.ld -T/opt/pinguino/v12/p32/lkr/elf32pic32mx.x -L/home/yao/Pinguino/v12/source/obj/non-free/usb -lm -lgcc -lc -fdollars-in-identifiers -I/opt/pinguino/v12/p32/include/non-free -I/opt/pinguino/v12/p32/include/pinguino/core -I/opt/pinguino/v12/p32/include/pinguino/libraries -I/opt/pinguino/v12/p32/lkr -I/home/yao/Desktop/Inloc/ZigBee_I2C_GPS -I/home/yao/Pinguino/v12/source/obj/non-free -mips16 -c -o /home/yao/Pinguino/v12/source/main32.o /home/yao/Pinguino/v12/source/main32.c

In file included from /opt/pinguino/v12/p32/include/pinguino/core/usbcdc.c:110:0,

from /home/yao/Pinguino/v12/source/define.h:8,

from /home/yao/Pinguino/v12/source/main32.c:38:

/opt/pinguino/v12/p32/include/pinguino/core/usb/usb_device.c: In function 'usb_ctrl_trf_tx_service':

/opt/pinguino/v12/p32/include/pinguino/core/usb/usb_device.c:1430:9: warning: assignment discards 'volatile' qualifier from pointer target type

dst = (USBVOLATILE u8*) ctrl_trf_data;

^

In file included from /home/yao/Pinguino/v12/source/define.h:8:0,

from /home/yao/Pinguino/v12/source/main32.c:38:

/opt/pinguino/v12/p32/include/pinguino/core/usbcdc.c: In function 'CDC_printf':

/opt/pinguino/v12/p32/include/pinguino/core/usbcdc.c:282:24: warning: passing argument 1 of 'psprintf2' from incompatible pointer type

cdc_tx_len = psprintf2(&cdc_data_tx, fmt, args);

^

In file included from /opt/pinguino/v12/p32/include/pinguino/core/usbcdc.c:97:0,

from /home/yao/Pinguino/v12/source/define.h:8,

from /home/yao/Pinguino/v12/source/main32.c:38:

/opt/pinguino/v12/p32/include/pinguino/libraries/printFormated.c:612:4: note: expected 'u8 *' but argument is of type 'volatile u8 (*)[64]'

u8 psprintf2(u8 *out, const u8 *format, va_list args)

^

In file included from /opt/pinguino/v12/p32/include/pinguino/core/usbcdc.c:75:0,

from /home/yao/Pinguino/v12/source/define.h:8,

from /home/yao/Pinguino/v12/source/main32.c:38:

/opt/pinguino/v12/p32/include/pinguino/libraries/printFormated.c: In function 'pprint':

/opt/pinguino/v12/p32/include/pinguino/libraries/printFormated.c:509:67: warning: 'u16' is promoted to 'int' when passed through '...'

val = (islong) ? va_arg(args, u32) : va_arg(args, u16);

^

/opt/pinguino/v12/p32/include/pinguino/libraries/printFormated.c:509:67: note: (so you should pass 'int' not 'u16' to 'va_arg')

/opt/pinguino/v12/p32/include/pinguino/libraries/printFormated.c:509:67: note: if this code is reached, the program will abort

/opt/pinguino/v12/p32/include/pinguino/libraries/printFormated.c:517:67: warning: 'u16' is promoted to 'int' when passed through '...'

val = (islong) ? va_arg(args, u32) : va_arg(args, u16);

^

/opt/pinguino/v12/p32/include/pinguino/libraries/printFormated.c:517:67: note: if this code is reached, the program will abort

/opt/pinguino/v12/p32/include/pinguino/libraries/printFormated.c:525:67: warning: 'u16' is promoted to 'int' when passed through '...'

val = (islong) ? va_arg(args, u32) : va_arg(args, u16);

^

/opt/pinguino/v12/p32/include/pinguino/libraries/printFormated.c:525:67: note: if this code is reached, the program will abort

/opt/pinguino/v12/p32/include/pinguino/libraries/printFormated.c:533:67: warning: 'u16' is promoted to 'int' when passed through '...'

val = (islong) ? va_arg(args, u32) : va_arg(args, u16);

^

/opt/pinguino/v12/p32/include/pinguino/libraries/printFormated.c:533:67: note: if this code is reached, the program will abort

/opt/pinguino/v12/p32/include/pinguino/libraries/printFormated.c:541:67: warning: 'u16' is promoted to 'int' when passed through '...'

val = (islong) ? va_arg(args, u32) : va_arg(args, u16);

^

/opt/pinguino/v12/p32/include/pinguino/libraries/printFormated.c:541:67: note: if this code is reached, the program will abort

/opt/pinguino/v12/p32/include/pinguino/libraries/printFormated.c:552:67: warning: 'u16' is promoted to 'int' when passed through '...'

val = (islong) ? va_arg(args, u32) : va_arg(args, u16);

^

/opt/pinguino/v12/p32/include/pinguino/libraries/printFormated.c:552:67: note: if this code is reached, the program will abort

/tmp/ccMxcstA.s: Assembler messages:

/tmp/ccMxcstA.s:8709: Error: unrecognized opcode `wait'

/home/yao/Pinguino/v12/source/Makefile32.linux:131: recipe for target 'compile' failed

make: *** [compile] Error 1