Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
led matrix 32mx270
26-11-2016, 03:32 PM, (This post was last modified: 26-11-2016, 03:33 PM by derf158.)
#1
led matrix 32mx270
hello,
 i am getting compile errors for the led matrix helloworld i am running this under linux ide v12 using the 32mx270

Code:
[INFO] Welcome to Pinguino IDE 12.0.0-beta.1
[INFO] Compiling: /home/fred/Pinguino/v12/examples/07.Display/LEDMatrix/MatrixHelloWorld.pde
[INFO] Board: Pinguino 32MX270
[INFO] Proc: 32MX270F256B
[INFO] Arch: 32
[INFO] MIPS 16: True
[INFO] Heap size: 2560 bytes
[INFO] Optimization: -O2
[INFO] Bootloader: microchip
[INFO] ERROR: /opt/pinguino/v12/p32/include/pinguino/libraries/ledcontrol.c:127:45: error: 'SPI_CLOCK_DIV16' undeclared (first use in this function)
[INFO]
[INFO] ERROR: /home/fred/Pinguino/v12/source/user.c:14:21: error: 'SSD1306_SPISW' undeclared (first use in this function)
[INFO]
[INFO] ERROR: /home/fred/Pinguino/v12/source/user.c:22:5: error: 'LedControl' undeclared (first use in this function)
[INFO]
[INFO] ERROR: /home/fred/Pinguino/v12/source/user.c:30:5: error: 'LedControl' undeclared (first use in this function)
[INFO]
Code:
2016-11-26 08:28:14.916259
######################################################################
# ------------------------------------------------------------------
# cleaning all build files
# ------------------------------------------------------------------
rm -f -v /home/fred/Pinguino/v12/source/main32.o
rm -f -v /home/fred/Pinguino/v12/source/main32.elf
rm -f -v /home/fred/Pinguino/v12/source/main32.hex
rm -f -v /home/fred/Pinguino/v12/source/obj/non-free/processor.o
removed ‘/home/fred/Pinguino/v12/source/obj/non-free/processor.o’
# ------------------------------------------------------------------
# adding proc. definitions
# ------------------------------------------------------------------
cp /home/fred/Pinguino/v12/source/obj/non-free/32MX270F256B.o /home/fred/Pinguino/v12/source/obj/non-free/processor.o
# ------------------------------------------------------------------
# compiling and linking
#    /home/fred/Pinguino/v12/source/obj/non-free/usb/libcdc220.a\
#    /home/fred/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/fred/Pinguino/v12/source/obj/non-free -Wl,-Map=/home/fred/Pinguino/v12/source/output.map -Wl,--defsym,_min_heap_size=2560 -D __P32GCC__ -D __PIC32MX__ -D __32MX270F256B__ -D PINGUINO32MX270 -T/opt/pinguino/v12/p32/lkr/32MX270F256B.ld -T/opt/pinguino/v12/p32/lkr/elf32pic32mx.x -L/home/fred/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/fred/Pinguino/v12/examples/07.Display/LEDMatrix -I/home/fred/Pinguino/v12/source/obj/non-free -mips16 -S -o /home/fred/Pinguino/v12/source/main32.S /home/fred/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/fred/Pinguino/v12/source/obj/non-free -Wl,-Map=/home/fred/Pinguino/v12/source/output.map -Wl,--defsym,_min_heap_size=2560 -D __P32GCC__ -D __PIC32MX__ -D __32MX270F256B__ -D PINGUINO32MX270 -T/opt/pinguino/v12/p32/lkr/32MX270F256B.ld -T/opt/pinguino/v12/p32/lkr/elf32pic32mx.x -L/home/fred/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/fred/Pinguino/v12/examples/07.Display/LEDMatrix -I/home/fred/Pinguino/v12/source/obj/non-free -mips16 -E /home/fred/Pinguino/v12/source/main32.c > /home/fred/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/fred/Pinguino/v12/source/obj/non-free -Wl,-Map=/home/fred/Pinguino/v12/source/output.map -Wl,--defsym,_min_heap_size=2560 -D __P32GCC__ -D __PIC32MX__ -D __32MX270F256B__ -D PINGUINO32MX270 -T/opt/pinguino/v12/p32/lkr/32MX270F256B.ld -T/opt/pinguino/v12/p32/lkr/elf32pic32mx.x -L/home/fred/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/fred/Pinguino/v12/examples/07.Display/LEDMatrix -I/home/fred/Pinguino/v12/source/obj/non-free -mips16 -c -o /home/fred/Pinguino/v12/source/main32.o /home/fred/Pinguino/v12/source/main32.c
In file included from /home/fred/Pinguino/v12/source/define.h:8:0,
                from /home/fred/Pinguino/v12/source/main32.c:38:
/opt/pinguino/v12/p32/include/pinguino/libraries/ledcontrol.c: In function 'LedControl_init':
/opt/pinguino/v12/p32/include/pinguino/libraries/ledcontrol.c:127:45: error: 'SPI_CLOCK_DIV16' undeclared (first use in this function)
        SPI_setClockDivider(LEDCONTROL_SPI, SPI_CLOCK_DIV16);
                                            ^
/opt/pinguino/v12/p32/include/pinguino/libraries/ledcontrol.c:127:45: note: each undeclared identifier is reported only once for each function it appears in
In file included from /home/fred/Pinguino/v12/source/main32.c:53:0:
/home/fred/Pinguino/v12/source/user.c: In function 'setup':
/home/fred/Pinguino/v12/source/user.c:14:21: error: 'SSD1306_SPISW' undeclared (first use in this function)
    LedControl_init(SSD1306_SPISW, 3, 1, 13, MATRIX);
                    ^
/home/fred/Pinguino/v12/source/user.c:22:5: error: 'LedControl' undeclared (first use in this function)
    LedControl.powerOn();
    ^
/home/fred/Pinguino/v12/source/user.c: In function 'loop':
/home/fred/Pinguino/v12/source/user.c:30:5: error: 'LedControl' undeclared (first use in this function)
    LedControl.clearAll();
    ^
In file included from /opt/pinguino/v12/p32/include/pinguino/libraries/ledcontrol.h:37:0,
                from /opt/pinguino/v12/p32/include/pinguino/libraries/ledcontrol.c:42,
                from /home/fred/Pinguino/v12/source/define.h:8,
                from /home/fred/Pinguino/v12/source/main32.c:38:
/opt/pinguino/v12/p32/include/pinguino/libraries/ledcontrol.c: In function 'LedControl_init':
/opt/pinguino/v12/p32/include/pinguino/libraries/ledcontrol.c:115:28: warning: 'u8' is promoted to 'int' when passed through '...'
        sda = va_arg(args, u8);                 // get the next arg
                           ^
/opt/pinguino/v12/p32/include/pinguino/libraries/ledcontrol.c:115:28: note: (so you should pass 'int' not 'u8' to 'va_arg')
/opt/pinguino/v12/p32/include/pinguino/libraries/ledcontrol.c:115:28: note: if this code is reached, the program will abort
/opt/pinguino/v12/p32/include/pinguino/libraries/ledcontrol.c:116:28: warning: 'u8' is promoted to 'int' when passed through '...'
        sck = va_arg(args, u8);                 // get the next arg
                           ^
/opt/pinguino/v12/p32/include/pinguino/libraries/ledcontrol.c:116:28: note: if this code is reached, the program will abort
/opt/pinguino/v12/p32/include/pinguino/libraries/ledcontrol.c:117:28: warning: 'u8' is promoted to 'int' when passed through '...'
        cs  = va_arg(args, u8);                 // get the next arg
                           ^
/opt/pinguino/v12/p32/include/pinguino/libraries/ledcontrol.c:117:28: note: if this code is reached, the program will abort
/opt/pinguino/v12/p32/include/pinguino/libraries/ledcontrol.c:131:32: warning: 'u8' is promoted to 'int' when passed through '...'
    gLastDevice = va_arg(args, u8) - 1;         // get the last arg
                               ^
/opt/pinguino/v12/p32/include/pinguino/libraries/ledcontrol.c:131:32: note: if this code is reached, the program will abort
/home/fred/Pinguino/v12/source/Makefile32.linux:131: recipe for target 'compile' failed
make: *** [compile] Error 1
Code:
p, li { white-space: pre-wrap; }
#define MATRIX 3 // number of matrix

u8 i;

void setup()
{
   // SPI SOFTWARE
   // pin 3 is connected to the DataIn
   // pin 1 is connected to the CLK
   // pin 13 is connected to the CS  
   LedControl.init(SPISW, 3, 1, 13, MATRIX);

   // SPI HARDWARE
   //LedControl.init(SPI1, MATRIX);


   // MAX72XX are in power-saving mode on startup,
   // we have to do a wakeup call
   LedControl.powerOn();
   // Set the brightness to a medium value (0~15 possible values)
   LedControl.setIntensity(1);
}

void loop()
{
   // display chars one after one
   LedControl.clearAll();
   for (i='A'; i<='Z'; i++)
   {
       LedControl.printChar(i);
       delay(333);
   }
   // display the string char by char
   LedControl.clearAll();
   for (i=0; i<=5; i++)
   {
       LedControl.print("Hello World!");
       delay(1000);
   }
   // scroll the string 1 pixel to the left
   LedControl.clearAll();
   for (i=0; i<(15*8); i++)
   {
       LedControl.scroll("www.pinguino.cc");
   }

   // display the number with printf
   LedControl.clearAll();
   for (i=0; i<=255; i++)
       LedControl.printf("%03d", i);

   // display the number with printNumber
   for (i=0; i<=255; i++)
   {
       LedControl.clearAll();
       LedControl.printNumber(i, DEC);
       delay(150);
   }
}
thank you
fred
Reply
26-11-2016, 05:20 PM,
#2
RE: led matrix 32mx270
Looks different on github so I suspect it's been changed (hopefully fixed).

John
Reply
27-11-2016, 04:13 AM,
#3
RE: led matrix 32mx270
(26-11-2016, 05:20 PM)pingotg Wrote: Looks different on github so I suspect it's been changed (hopefully fixed).

John

john,
 i changed the ledcontrol.c and ledcontrol.h files back to the github and also changed the pde back to the matrix examples and they compile fine now. these files seem to be from the V11?
Reply
27-11-2016, 10:59 PM,
#4
RE: led matrix 32mx270
I don't know - I didn't ever use them.

John
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)