Example XPC567XRKIT PinToggleStationery CW210

cancel
Showing results for 
Search instead for 
Did you mean: 

Example XPC567XRKIT PinToggleStationery CW210

No ratings

Example XPC567XRKIT PinToggleStationery CW210

********************************************************************************

* Detailed Description:

* Application performs basic initialization, setup PLL to maximum allowed freq.,

* initializes interrupts, blinking one LED by interrupt, second LED by software

* loop (by second core), initializes and display notice via UART terminal and

* then terminal ECHO.

* The example configures the device for maximum performance (OPTIMIZATIONS_ON).

* For XPC567XKIT516 it initializes EBI for mounted external SRAM device.

*

* ------------------------------------------------------------------------------

* Test HW:         XPC567XKIT516 - MPC567xADAT516 Rev.D, MPC567XEVBFXMB Rev.C

* MCU:             PPC5676RDMVY1 3N23A

* Terminal:        19200-8-no parity-1 stop bit-no flow control on eSCI_A

* Fsys:            180MHz

* Debugger:        Lauterbach Trace32

*                  PeMicro USB-ML-PPCNEXUS

* Target:          RAM, internal_FLASH

* EVB connection:  ETPUC0(J24-0) -> USER_LED_8 (J5-8)

*                  ETPUC1(J24-1) -> USER_LED_7 (J5-7)(to see blinking LEDs)

*

********************************************************************************

Labels (1)
Attachments
Comments

Thank you very much for your demo! I will try my best to study the demo before programming on the device.

Hi David,

thank you for your demo! I've already learned few new things with your code. However, I am having a hard time to compile the entire project. I am using S32, C project, Newlib. I copied your *.h files into `include` and the *.c into `src`. What else? This is the output of the compiler:

make -j8 all
Building file: ../src/main.c
Executing target #7 ../src/main.c
Invoking: Standard S32DS C Compiler
powerpc-eabivle-gcc "@src/main.args" -MMD -MP -MF"src/main.d" -MT"src/main.o" -c -o "src/main.o" "../src/main.c"
In file included from ../src/main.c:65:0:
/home/fab/Projects/gm/quicksilver/testl/testl_Z7_0/include/Exceptions.h:21:0: warning: ignoring #pragma section RX [-Wunknown-pragmas]
 #pragma section RX ".__exception_handlers_p0"
 ^
/home/fab/Projects/gm/quicksilver/testl/testl_Z7_0/include/Exceptions.h:26:21: error: expected ')' before string constant
 __declspec (section ".__exception_handlers_p0") void EXCEP_DefaultExceptionHandler(void);
                     ^
/home/fab/Projects/gm/quicksilver/testl/testl_Z7_0/include/Exceptions.h:44:7: error: expected '(' before 'void'
 __asm void EXCEP_InitExceptionHandlers(void);
       ^
In file included from ../src/main.c:66:0:
/home/fab/Projects/gm/quicksilver/testl/testl_Z7_0/include/IntcInterrupts.h:36:7: error: expected '(' before 'void'
 __asm void INTC_InitINTCInterrupts(void);
       ^
src/subdir.mk:109: recipe for target 'src/main.o' failed
/home/fab/Projects/gm/quicksilver/testl/testl_Z7_0/include/IntcInterrupts.h:52:0: warning: ignoring #pragma section RX [-Wunknown-pragmas]
 #pragma section RX ".__exception_handlers_p0"
 ^
/home/fab/Projects/gm/quicksilver/testl/testl_Z7_0/include/IntcInterrupts.h:58:21: error: expected ')' before string constant
 __declspec (section ".__exception_handlers_p0") void INTC_INTCInterruptHandler(void);
                     ^
In file included from ../src/main.c:67:0:
/home/fab/Projects/gm/quicksilver/testl/testl_Z7_0/include/uart.h:29:2: error: #error _MSL_CONSOLE_SUPPORT must not be defined to 1.
 #error _MSL_CONSOLE_SUPPORT must not be defined to 1.
  ^
../src/main.c:111:8: error: expected identifier or '(' before 'asm'
 static asm void BranchPredictionEnable(void);
        ^
../src/main.c:119:8: error: expected identifier or '(' before 'asm'
 static asm void External_SRAM_MMU_init(void);
        ^
../src/main.c: In function 'DisableWatchdog':
../src/main.c:193:5: error: expected '(' before '{' token
     {
     ^
../src/main.c:194:9: error: unknown type name 'mfhid0'
         mfhid0  r11       /* Move from spr HID0 to r11 (copies HID0) */
         ^
../src/main.c:195:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'li'
         li      r12, 0xBFFF  /* Load immed. data of ~0x4000 to r12 */
         ^
../src/main.c:216:13: error: invalid storage class for function 'External_SRAM_init'
 static void External_SRAM_init(void)
             ^
../src/main.c: In function 'External_SRAM_init':
../src/main.c:221:5: warning: implicit declaration of function 'External_SRAM_MMU_init' [-Wimplicit-function-declaration]
     External_SRAM_MMU_init();
     ^
../src/main.c: In function 'DisableWatchdog':
../src/main.c:305:8: error: expected identifier or '(' before 'asm'
 static asm void External_SRAM_MMU_init(void)
        ^
../src/main.c:339:13: error: invalid storage class for function 'eTPU_RAM_init'
 static void eTPU_RAM_init(void)
             ^
../src/main.c: In function 'eTPU_RAM_init':
../src/main.c:355:5: error: expected '(' before '{' token
     {
     ^
../src/main.c:356:9: error: unknown type name 'lis'
         lis r3, 0x1004
         ^
../src/main.c:356:17: error: expected identifier or '(' before numeric constant
         lis r3, 0x1004
                 ^
../src/main.c:356:13: warning: unused variable 'r3' [-Wunused-variable]
         lis r3, 0x1004
             ^
../src/main.c:413:13: error: invalid storage class for function 'FMPLL_init'
 static void FMPLL_init(void)
             ^
../src/main.c:441:13: error: invalid storage class for function 'GPIO_init'
 static void GPIO_init(void)
             ^
../src/main.c:464:13: error: invalid storage class for function 'PIT3_isr'
 static void PIT3_isr(void)
             ^
../src/main.c:484:13: error: invalid storage class for function 'PIT3_init'
 static void PIT3_init(void)
             ^
../src/main.c:512:13: error: invalid storage class for function 'Interrupts_init'
 static void Interrupts_init(void)
             ^
../src/main.c:535:13: error: invalid storage class for function 'Terminal_ECHO'
 static void Terminal_ECHO(void)
             ^
../src/main.c:576:5: warning: 'main' is normally a non-static function [-Wmain]
 int main(void)
     ^
../src/main.c: In function 'main':
../src/main.c:578:22: warning: unused variable 'cnt' [-Wunused-variable]
     register int32_t cnt = 0;
                      ^
../src/main.c: In function 'eTPU_RAM_init':
../src/main.c:608:1: error: expected declaration or statement at end of input
 }
 ^
../src/main.c: In function 'DisableWatchdog':
../src/main.c:608:1: error: expected declaration or statement at end of input
../src/main.c: At top level:
../src/main.c:113:13: warning: 'FMPLL_init' used but never defined
 static void FMPLL_init(void);
             ^
../src/main.c:117:13: warning: 'eTPU_RAM_init' used but never defined
 static void eTPU_RAM_init(void);
             ^
../src/main.c:118:13: warning: 'External_SRAM_init' used but never defined
 static void External_SRAM_init(void);
             ^
../src/main.c:112:13: warning: 'GPIO_init' declared 'static' but never defined [-Wunused-function]
 static void GPIO_init(void);
             ^
../src/main.c:114:13: warning: 'Interrupts_init' declared 'static' but never defined [-Wunused-function]
 static void Interrupts_init(void);
             ^
../src/main.c:115:13: warning: 'PIT3_isr' declared 'static' but never defined [-Wunused-function]
 static void PIT3_isr(void);
             ^
../src/main.c:116:13: warning: 'PIT3_init' declared 'static' but never defined [-Wunused-function]
 static void PIT3_init(void);
             ^
../src/main.c:120:13: warning: 'Terminal_ECHO' declared 'static' but never defined [-Wunused-function]
 static void Terminal_ECHO(void);
             ^
make: *** [src/main.o] Error 1

17:13:53 Build Finished (took 322ms)

Can you help me with this? I would like to be able to use the UART for a very important project we are working on.

Fab

Hi, pay attention to following link:

https://community.nxp.com/docs/DOC-335330 

Colleagues ported some of our PinToggleStationery example project into S32DS environment.

Hope it helps

Version history
Revision #:
1 of 1
Last update:
‎11-07-2014 06:35 AM
Updated by: