大联大控股世平集团WPI-NXP S32K312 DVK核心板(四)
·
(七)大联大控股世平集团WPI-NXP S32K312 DVK核心板UART通信

1.新建工程及代码设计
1.1双击“S32 Design Studio for S32 Platform 3.6.3”;

1.2点击“File”,选择“New”,选择“S32DS Application Project”;

1.3输入“Project Name”,“Processors”选择“Family S32K3xx”中的“S32K312”,“ToolChain Selection”选择“M7”,点击“Next”;

1.4确认相关配置项,点击“Finish”;

1.5此时获得初始化模板;

/*==================================================================================================
* Project : RTD AUTOSAR 4.7
* Platform : CORTEXM
* Peripheral : S32K3XX
* Dependencies : none
*
* Autosar Version : 4.7.0
* Autosar Revision : ASR_REL_4_7_REV_0000
* Autosar Conf.Variant :
* SW Version : 3.0.0
* Build Version : S32K3_RTD_3_0_0_D2303_ASR_REL_4_7_REV_0000_20230331
*
* Copyright 2020 - 2023 NXP Semiconductors
*
* NXP Confidential. This software is owned or controlled by NXP and may only be
* used strictly in accordance with the applicable license terms. By expressly
* accepting such terms or by downloading, installing, activating and/or otherwise
* using the software, you are agreeing that you have read, and that you agree to
* comply with and are bound by, such license terms. If you do not agree to be
* bound by the applicable license terms, then you may not retain, install,
* activate or otherwise use the software.
==================================================================================================*/
/**
* @file main.c
*
* @addtogroup main_module main module documentation
* @{
*/
/* Including necessary configuration files. */
#include "Mcal.h"
volatile int exit_code = 0;
/* User includes */
/*!
\brief The main function for the project.
\details The startup initialization sequence is the following:
* - startup asm routine
* - main()
*/
int main(void)
{
/* Write your code here */
for(;;)
{
if(exit_code != 0)
{
break;
}
}
return exit_code;
}
/** @} */
1.6在左侧“Project Explorer”中打开项目,双击“.mex”;

1.7在左侧“引脚”中选择勾选49号引脚“PTC3”,“引脚[49]上的所有信号”勾选“LPUART0:lpuart0_tx”,“选择路由方向”选择“Output”,点击“OK”,点击“完成”;

1.8在左侧“引脚”中选择勾选50号引脚“PTC2”,“引脚[50]上的所有信号”勾选“LPUART0:lpuart0_rx”,点击“OK”,点击“完成”;

1.9如下图所示即为完成大联大控股世平集团WPI-NXP S32K312 DVK核心板UART引脚配置;

1.10点击右上角“外设”,点击“Drivers”,选择“BaseNXP”,点击“确定”;

1.11选择“Lpuart_Uart”,点击“确定”;

1.12选择“Siul2_Port”,点击“确定”;

1.13选择“Siul2_Port”,选择“PortConfigSet”,选择“PortContainer”,选择“PortPin0”,“PortPin Mscr”输入66;

1.14选择“Siul2_Port”,选择“PortConfigSet”,选择“PortContainer”,新增“PortPin1”,“PortPin Mscr”输入67;

1.15选择“Lpuart_Uart”,选择“UartGlobalConfig”,其中“UartChannel”选择“UartChannel_0”,其中“DetailModuleConfiguration”下“Desire Baudrate”选择“LPUART_UART_BAUDRATE_115200”;

1.16点击右上角“更新源代码”,点击“OK”;

1.17修改main.c如下;

/*==================================================================================================
* Project : RTD AUTOSAR 4.7
* Platform : CORTEXM
* Peripheral : S32K3XX
* Dependencies : none
*
* Autosar Version : 4.7.0
* Autosar Revision : ASR_REL_4_7_REV_0000
* Autosar Conf.Variant :
* SW Version : 3.0.0
* Build Version : S32K3_RTD_3_0_0_D2303_ASR_REL_4_7_REV_0000_20230331
*
* Copyright 2020 - 2023 NXP Semiconductors
*
* NXP Confidential. This software is owned or controlled by NXP and may only be
* used strictly in accordance with the applicable license terms. By expressly
* accepting such terms or by downloading, installing, activating and/or otherwise
* using the software, you are agreeing that you have read, and that you agree to
* comply with and are bound by, such license terms. If you do not agree to be
* bound by the applicable license terms, then you may not retain, install,
* activate or otherwise use the software.
==================================================================================================*/
/**
* @file main.c
*
* @addtogroup main_module main module documentation
* @{
*/
/* Including necessary configuration files. */
#include "string.h"
#include "stdio.h"
#include "S32K312.h"
#include "Clock_Ip.h"
#include "OsIf.h"
#include "Siul2_Port_Ip.h"
#include "Lpuart_Uart_Ip.h"
volatile int exit_code = 0;
/* User includes */
/*!
\brief The main function for the project.
\details The startup initialization sequence is the following:
* - startup asm routine
* - main()
*/
#define UART_INSTANCE 0
#define TIMEOUT 0xFFFFU
/* Write your code here */
int main(void)
{
Clock_Ip_Init(Clock_Ip_aClockConfig);
Siul2_Port_Ip_Init(NUM_OF_CONFIGURED_PINS0,g_pin_mux_InitConfigArr0);
Lpuart_Uart_Ip_Init(UART_INSTANCE, &Lpuart_Uart_Ip_xHwConfigPB_0);
uint8 rxBuffer[32] = {0};
uint8 txMsg[] = "Received: ";
//const uint8 msg[] = "Test uart\r\n";
//(void)Lpuart_Uart_Ip_SyncSend(UART_INSTANCE, msg, sizeof(msg) - 1, TIMEOUT);
for(;;)
{
Lpuart_Uart_Ip_StatusType status = Lpuart_Uart_Ip_SyncReceive(UART_INSTANCE, rxBuffer, 1, TIMEOUT);
if (status == LPUART_UART_IP_STATUS_SUCCESS)
{
Lpuart_Uart_Ip_SyncSend(UART_INSTANCE, txMsg, sizeof(txMsg) - 1, TIMEOUT);
Lpuart_Uart_Ip_SyncSend(UART_INSTANCE, rxBuffer, 1, TIMEOUT);
Lpuart_Uart_Ip_SyncSend(UART_INSTANCE, (uint8 *)"\r\n", 2, TIMEOUT);
}
if (exit_code != 0)
{
break;
}
}
return exit_code;
}
/** @} */
1.18点击左上角“Build”,若显示下属内容则为编译成功。

10:38:06 **** Build of configuration Debug_FLASH for project TestUART ****
make -j4 all
Building file: ../generate/src/Clock_Ip_Cfg.c
Building file: ../generate/src/Lpuart_Uart_Ip_Sa_PBcfg.c
Building file: ../generate/src/Igf_Port_Ip_Cfg.c
Building file: ../src/main.c
Invoking: Standard S32DS C Compiler
Invoking: Standard S32DS C Compiler
arm-none-eabi-gcc "@generate/src/Clock_Ip_Cfg.args" -MMD -MP -MF"generate/src/Clock_Ip_Cfg.d" -MT"generate/src/Clock_Ip_Cfg.o" -o "generate/src/Clock_Ip_Cfg.o" "../generate/src/Clock_Ip_Cfg.c"
Invoking: Standard S32DS C Compiler
arm-none-eabi-gcc "@generate/src/Clock_Ip_Cfg.args" -MMD -MP -MF"generate/src/Lpuart_Uart_Ip_Sa_PBcfg.d" -MT"generate/src/Lpuart_Uart_Ip_Sa_PBcfg.o" -o "generate/src/Lpuart_Uart_Ip_Sa_PBcfg.o" "../generate/src/Lpuart_Uart_Ip_Sa_PBcfg.c"
arm-none-eabi-gcc "@generate/src/Clock_Ip_Cfg.args" -MMD -MP -MF"generate/src/Igf_Port_Ip_Cfg.d" -MT"generate/src/Igf_Port_Ip_Cfg.o" -o "generate/src/Igf_Port_Ip_Cfg.o" "../generate/src/Igf_Port_Ip_Cfg.c"
Invoking: Standard S32DS C Compiler
arm-none-eabi-gcc "@src/main.args" -MMD -MP -MF"src/main.d" -MT"src/main.o" -o "src/main.o" "../src/main.c"
Finished building: ../generate/src/Lpuart_Uart_Ip_Sa_PBcfg.c
Finished building: ../generate/src/Clock_Ip_Cfg.c
Finished building: ../generate/src/Igf_Port_Ip_Cfg.c
Building file: ../board/Siul2_Port_Ip_Cfg.c
Building file: ../generate/src/OsIf_Cfg.c
Building file: ../board/Tspc_Port_Ip_Cfg.c
Invoking: Standard S32DS C Compiler
arm-none-eabi-gcc "@board/Siul2_Port_Ip_Cfg.args" -MMD -MP -MF"board/Siul2_Port_Ip_Cfg.d" -MT"board/Siul2_Port_Ip_Cfg.o" -o "board/Siul2_Port_Ip_Cfg.o" "../board/Siul2_Port_Ip_Cfg.c"
Invoking: Standard S32DS C Compiler
arm-none-eabi-gcc "@generate/src/Clock_Ip_Cfg.args" -MMD -MP -MF"generate/src/OsIf_Cfg.d" -MT"generate/src/OsIf_Cfg.o" -o "generate/src/OsIf_Cfg.o" "../generate/src/OsIf_Cfg.c"
Invoking: Standard S32DS C Compiler
arm-none-eabi-gcc "@board/Siul2_Port_Ip_Cfg.args" -MMD -MP -MF"board/Tspc_Port_Ip_Cfg.d" -MT"board/Tspc_Port_Ip_Cfg.o" -o "board/Tspc_Port_Ip_Cfg.o" "../board/Tspc_Port_Ip_Cfg.c"
Finished building: ../board/Siul2_Port_Ip_Cfg.c
Building file: ../RTD/src/Clock_Ip.c
Invoking: Standard S32DS C Compiler
arm-none-eabi-gcc "@RTD/src/Clock_Ip.args" -MMD -MP -MF"RTD/src/Clock_Ip.d" -MT"RTD/src/Clock_Ip.o" -o "RTD/src/Clock_Ip.o" "../RTD/src/Clock_Ip.c"
Finished building: ../generate/src/OsIf_Cfg.c
Finished building: ../board/Tspc_Port_Ip_Cfg.c
Building file: ../RTD/src/Clock_Ip_Data.c
Invoking: Standard S32DS C Compiler
Building file: ../RTD/src/Clock_Ip_Divider.c
arm-none-eabi-gcc "@RTD/src/Clock_Ip.args" -MMD -MP -MF"RTD/src/Clock_Ip_Data.d" -MT"RTD/src/Clock_Ip_Data.o" -o "RTD/src/Clock_Ip_Data.o" "../RTD/src/Clock_Ip_Data.c"
Invoking: Standard S32DS C Compiler
arm-none-eabi-gcc "@RTD/src/Clock_Ip.args" -MMD -MP -MF"RTD/src/Clock_Ip_Divider.d" -MT"RTD/src/Clock_Ip_Divider.o" -o "RTD/src/Clock_Ip_Divider.o" "../RTD/src/Clock_Ip_Divider.c"
Finished building: ../RTD/src/Clock_Ip_Data.c
Building file: ../RTD/src/Clock_Ip_DividerTrigger.c
Invoking: Standard S32DS C Compiler
arm-none-eabi-gcc "@RTD/src/Clock_Ip.args" -MMD -MP -MF"RTD/src/Clock_Ip_DividerTrigger.d" -MT"RTD/src/Clock_Ip_DividerTrigger.o" -o "RTD/src/Clock_Ip_DividerTrigger.o" "../RTD/src/Clock_Ip_DividerTrigger.c"
Finished building: ../RTD/src/Clock_Ip.c
Finished building: ../src/main.c
Finished building: ../RTD/src/Clock_Ip_Divider.c
Building file: ../RTD/src/Clock_Ip_ExtOsc.c
Finished building: ../RTD/src/Clock_Ip_DividerTrigger.c
Invoking: Standard S32DS C Compiler
Building file: ../RTD/src/Clock_Ip_FracDiv.c
arm-none-eabi-gcc "@RTD/src/Clock_Ip.args" -MMD -MP -MF"RTD/src/Clock_Ip_ExtOsc.d" -MT"RTD/src/Clock_Ip_ExtOsc.o" -o "RTD/src/Clock_Ip_ExtOsc.o" "../RTD/src/Clock_Ip_ExtOsc.c"
Invoking: Standard S32DS C Compiler
Building file: ../RTD/src/Clock_Ip_Frequency.c
arm-none-eabi-gcc "@RTD/src/Clock_Ip.args" -MMD -MP -MF"RTD/src/Clock_Ip_FracDiv.d" -MT"RTD/src/Clock_Ip_FracDiv.o" -o "RTD/src/Clock_Ip_FracDiv.o" "../RTD/src/Clock_Ip_FracDiv.c"
Invoking: Standard S32DS C Compiler
arm-none-eabi-gcc "@RTD/src/Clock_Ip.args" -MMD -MP -MF"RTD/src/Clock_Ip_Frequency.d" -MT"RTD/src/Clock_Ip_Frequency.o" -o "RTD/src/Clock_Ip_Frequency.o" "../RTD/src/Clock_Ip_Frequency.c"
Building file: ../RTD/src/Clock_Ip_Gate.c
Invoking: Standard S32DS C Compiler
arm-none-eabi-gcc "@RTD/src/Clock_Ip.args" -MMD -MP -MF"RTD/src/Clock_Ip_Gate.d" -MT"RTD/src/Clock_Ip_Gate.o" -o "RTD/src/Clock_Ip_Gate.o" "../RTD/src/Clock_Ip_Gate.c"
Finished building: ../RTD/src/Clock_Ip_ExtOsc.c
Finished building: ../RTD/src/Clock_Ip_FracDiv.c
Building file: ../RTD/src/Clock_Ip_IntOsc.c
Invoking: Standard S32DS C Compiler
Finished building: ../RTD/src/Clock_Ip_Frequency.c
Building file: ../RTD/src/Clock_Ip_Irq.c
arm-none-eabi-gcc "@RTD/src/Clock_Ip.args" -MMD -MP -MF"RTD/src/Clock_Ip_IntOsc.d" -MT"RTD/src/Clock_Ip_IntOsc.o" -o "RTD/src/Clock_Ip_IntOsc.o" "../RTD/src/Clock_Ip_IntOsc.c"
Invoking: Standard S32DS C Compiler
Building file: ../RTD/src/Clock_Ip_Monitor.c
arm-none-eabi-gcc "@RTD/src/Clock_Ip.args" -MMD -MP -MF"RTD/src/Clock_Ip_Irq.d" -MT"RTD/src/Clock_Ip_Irq.o" -o "RTD/src/Clock_Ip_Irq.o" "../RTD/src/Clock_Ip_Irq.c"
Finished building: ../RTD/src/Clock_Ip_Gate.c
Invoking: Standard S32DS C Compiler
arm-none-eabi-gcc "@RTD/src/Clock_Ip.args" -MMD -MP -MF"RTD/src/Clock_Ip_Monitor.d" -MT"RTD/src/Clock_Ip_Monitor.o" -o "RTD/src/Clock_Ip_Monitor.o" "../RTD/src/Clock_Ip_Monitor.c"
Building file: ../RTD/src/Clock_Ip_Pll.c
Invoking: Standard S32DS C Compiler
arm-none-eabi-gcc "@RTD/src/Clock_Ip.args" -MMD -MP -MF"RTD/src/Clock_Ip_Pll.d" -MT"RTD/src/Clock_Ip_Pll.o" -o "RTD/src/Clock_Ip_Pll.o" "../RTD/src/Clock_Ip_Pll.c"
Finished building: ../RTD/src/Clock_Ip_Irq.c
Building file: ../RTD/src/Clock_Ip_ProgFreqSwitch.c
Finished building: ../RTD/src/Clock_Ip_IntOsc.c
Invoking: Standard S32DS C Compiler
arm-none-eabi-gcc "@RTD/src/Clock_Ip.args" -MMD -MP -MF"RTD/src/Clock_Ip_ProgFreqSwitch.d" -MT"RTD/src/Clock_Ip_ProgFreqSwitch.o" -o "RTD/src/Clock_Ip_ProgFreqSwitch.o" "../RTD/src/Clock_Ip_ProgFreqSwitch.c"
Finished building: ../RTD/src/Clock_Ip_Monitor.c
Building file: ../RTD/src/Clock_Ip_Selector.c
Invoking: Standard S32DS C Compiler
Building file: ../RTD/src/Clock_Ip_Specific.c
arm-none-eabi-gcc "@RTD/src/Clock_Ip.args" -MMD -MP -MF"RTD/src/Clock_Ip_Selector.d" -MT"RTD/src/Clock_Ip_Selector.o" -o "RTD/src/Clock_Ip_Selector.o" "../RTD/src/Clock_Ip_Selector.c"
Invoking: Standard S32DS C Compiler
arm-none-eabi-gcc "@RTD/src/Clock_Ip.args" -MMD -MP -MF"RTD/src/Clock_Ip_Specific.d" -MT"RTD/src/Clock_Ip_Specific.o" -o "RTD/src/Clock_Ip_Specific.o" "../RTD/src/Clock_Ip_Specific.c"
Finished building: ../RTD/src/Clock_Ip_Pll.c
Building file: ../RTD/src/Det.c
Finished building: ../RTD/src/Clock_Ip_ProgFreqSwitch.c
Invoking: Standard S32DS C Compiler
arm-none-eabi-gcc "@RTD/src/Clock_Ip.args" -MMD -MP -MF"RTD/src/Det.d" -MT"RTD/src/Det.o" -o "RTD/src/Det.o" "../RTD/src/Det.c"
Building file: ../RTD/src/Det_stub.c
Invoking: Standard S32DS C Compiler
arm-none-eabi-gcc "@RTD/src/Clock_Ip.args" -MMD -MP -MF"RTD/src/Det_stub.d" -MT"RTD/src/Det_stub.o" -o "RTD/src/Det_stub.o" "../RTD/src/Det_stub.c"
Finished building: ../RTD/src/Clock_Ip_Selector.c
Finished building: ../RTD/src/Det.c
Building file: ../RTD/src/Igf_Port_Ip.c
Finished building: ../RTD/src/Clock_Ip_Specific.c
Finished building: ../RTD/src/Det_stub.c
Building file: ../RTD/src/Lpuart_Uart_Ip.c
Invoking: Standard S32DS C Compiler
arm-none-eabi-gcc "@RTD/src/Clock_Ip.args" -MMD -MP -MF"RTD/src/Igf_Port_Ip.d" -MT"RTD/src/Igf_Port_Ip.o" -o "RTD/src/Igf_Port_Ip.o" "../RTD/src/Igf_Port_Ip.c"
Invoking: Standard S32DS C Compiler
arm-none-eabi-gcc "@RTD/src/Clock_Ip.args" -MMD -MP -MF"RTD/src/Lpuart_Uart_Ip.d" -MT"RTD/src/Lpuart_Uart_Ip.o" -o "RTD/src/Lpuart_Uart_Ip.o" "../RTD/src/Lpuart_Uart_Ip.c"
Building file: ../RTD/src/Lpuart_Uart_Ip_Irq.c
Building file: ../RTD/src/OsIf_Interrupts.c
Invoking: Standard S32DS C Compiler
arm-none-eabi-gcc "@RTD/src/Clock_Ip.args" -MMD -MP -MF"RTD/src/Lpuart_Uart_Ip_Irq.d" -MT"RTD/src/Lpuart_Uart_Ip_Irq.o" -o "RTD/src/Lpuart_Uart_Ip_Irq.o" "../RTD/src/Lpuart_Uart_Ip_Irq.c"
Invoking: Standard S32DS C Compiler
arm-none-eabi-gcc "@RTD/src/Clock_Ip.args" -MMD -MP -MF"RTD/src/OsIf_Interrupts.d" -MT"RTD/src/OsIf_Interrupts.o" -o "RTD/src/OsIf_Interrupts.o" "../RTD/src/OsIf_Interrupts.c"
Finished building: ../RTD/src/Igf_Port_Ip.c
Finished building: ../RTD/src/Lpuart_Uart_Ip_Irq.c
Building file: ../RTD/src/OsIf_Timer.c
Invoking: Standard S32DS C Compiler
arm-none-eabi-gcc "@RTD/src/Clock_Ip.args" -MMD -MP -MF"RTD/src/OsIf_Timer.d" -MT"RTD/src/OsIf_Timer.o" -o "RTD/src/OsIf_Timer.o" "../RTD/src/OsIf_Timer.c"
Finished building: ../RTD/src/OsIf_Interrupts.c
Building file: ../RTD/src/OsIf_Timer_System.c
Finished building: ../RTD/src/Lpuart_Uart_Ip.c
Invoking: Standard S32DS C Compiler
arm-none-eabi-gcc "@RTD/src/Clock_Ip.args" -MMD -MP -MF"RTD/src/OsIf_Timer_System.d" -MT"RTD/src/OsIf_Timer_System.o" -o "RTD/src/OsIf_Timer_System.o" "../RTD/src/OsIf_Timer_System.c"
Building file: ../RTD/src/OsIf_Timer_System_Internal_Systick.c
Invoking: Standard S32DS C Compiler
Building file: ../RTD/src/SchM_Mcu.c
arm-none-eabi-gcc "@RTD/src/Clock_Ip.args" -MMD -MP -MF"RTD/src/OsIf_Timer_System_Internal_Systick.d" -MT"RTD/src/OsIf_Timer_System_Internal_Systick.o" -o "RTD/src/OsIf_Timer_System_Internal_Systick.o" "../RTD/src/OsIf_Timer_System_Internal_Systick.c"
Invoking: Standard S32DS C Compiler
arm-none-eabi-gcc "@RTD/src/Clock_Ip.args" -MMD -MP -MF"RTD/src/SchM_Mcu.d" -MT"RTD/src/SchM_Mcu.o" -o "RTD/src/SchM_Mcu.o" "../RTD/src/SchM_Mcu.c"
Finished building: ../RTD/src/OsIf_Timer.c
Finished building: ../RTD/src/OsIf_Timer_System.c
Building file: ../RTD/src/SchM_Port.c
Invoking: Standard S32DS C Compiler
Building file: ../RTD/src/SchM_Uart.c
arm-none-eabi-gcc "@RTD/src/Clock_Ip.args" -MMD -MP -MF"RTD/src/SchM_Port.d" -MT"RTD/src/SchM_Port.o" -o "RTD/src/SchM_Port.o" "../RTD/src/SchM_Port.c"
Invoking: Standard S32DS C Compiler
arm-none-eabi-gcc "@RTD/src/Clock_Ip.args" -MMD -MP -MF"RTD/src/SchM_Uart.d" -MT"RTD/src/SchM_Uart.o" -o "RTD/src/SchM_Uart.o" "../RTD/src/SchM_Uart.c"
Finished building: ../RTD/src/OsIf_Timer_System_Internal_Systick.c
Finished building: ../RTD/src/SchM_Mcu.c
Building file: ../RTD/src/Siul2_Port_Ip.c
Invoking: Standard S32DS C Compiler
Building file: ../RTD/src/Tspc_Port_Ip.c
arm-none-eabi-gcc "@RTD/src/Clock_Ip.args" -MMD -MP -MF"RTD/src/Siul2_Port_Ip.d" -MT"RTD/src/Siul2_Port_Ip.o" -o "RTD/src/Siul2_Port_Ip.o" "../RTD/src/Siul2_Port_Ip.c"
Invoking: Standard S32DS C Compiler
arm-none-eabi-gcc "@RTD/src/Clock_Ip.args" -MMD -MP -MF"RTD/src/Tspc_Port_Ip.d" -MT"RTD/src/Tspc_Port_Ip.o" -o "RTD/src/Tspc_Port_Ip.o" "../RTD/src/Tspc_Port_Ip.c"
Finished building: ../RTD/src/SchM_Uart.c
Building file: ../Project_Settings/Startup_Code/Vector_Table.s
Finished building: ../RTD/src/SchM_Port.c
Invoking: Standard S32DS Assembler
arm-none-eabi-gcc "@Project_Settings/Startup_Code/Vector_Table.args" -o "Project_Settings/Startup_Code/Vector_Table.o" "../Project_Settings/Startup_Code/Vector_Table.s"
Building file: ../Project_Settings/Startup_Code/exceptions.c
Invoking: Standard S32DS C Compiler
arm-none-eabi-gcc "@Project_Settings/Startup_Code/exceptions.args" -MMD -MP -MF"Project_Settings/Startup_Code/exceptions.d" -MT"Project_Settings/Startup_Code/exceptions.o" -o "Project_Settings/Startup_Code/exceptions.o" "../Project_Settings/Startup_Code/exceptions.c"
Finished building: ../RTD/src/Tspc_Port_Ip.c
Finished building: ../RTD/src/Siul2_Port_Ip.c
Finished building: ../Project_Settings/Startup_Code/Vector_Table.s
Building file: ../Project_Settings/Startup_Code/nvic.c
Building file: ../Project_Settings/Startup_Code/startup.c
Invoking: Standard S32DS C Compiler
arm-none-eabi-gcc "@Project_Settings/Startup_Code/exceptions.args" -MMD -MP -MF"Project_Settings/Startup_Code/nvic.d" -MT"Project_Settings/Startup_Code/nvic.o" -o "Project_Settings/Startup_Code/nvic.o" "../Project_Settings/Startup_Code/nvic.c"
Invoking: Standard S32DS C Compiler
Building file: ../Project_Settings/Startup_Code/startup_cm7.s
Finished building: ../Project_Settings/Startup_Code/exceptions.c
arm-none-eabi-gcc "@Project_Settings/Startup_Code/exceptions.args" -MMD -MP -MF"Project_Settings/Startup_Code/startup.d" -MT"Project_Settings/Startup_Code/startup.o" -o "Project_Settings/Startup_Code/startup.o" "../Project_Settings/Startup_Code/startup.c"
Invoking: Standard S32DS Assembler
arm-none-eabi-gcc "@Project_Settings/Startup_Code/Vector_Table.args" -o "Project_Settings/Startup_Code/startup_cm7.o" "../Project_Settings/Startup_Code/startup_cm7.s"
Building file: ../Project_Settings/Startup_Code/system.c
Invoking: Standard S32DS C Compiler
arm-none-eabi-gcc "@Project_Settings/Startup_Code/exceptions.args" -MMD -MP -MF"Project_Settings/Startup_Code/system.d" -MT"Project_Settings/Startup_Code/system.o" -o "Project_Settings/Startup_Code/system.o" "../Project_Settings/Startup_Code/system.c"
Finished building: ../Project_Settings/Startup_Code/startup.c
Finished building: ../Project_Settings/Startup_Code/nvic.c
Finished building: ../Project_Settings/Startup_Code/startup_cm7.s
Finished building: ../Project_Settings/Startup_Code/system.c
Building target: TestUART.elf
Invoking: Standard S32DS C Linker
arm-none-eabi-gcc -o "TestUART.elf" "@TestUART.args"
c:/nxp/s32ds.3.6.3/s32ds/build_tools/gcc_v10.2/gcc-10.2-arm32-eabi/bin/../lib/gcc/arm-none-eabi/10.2.0/../../../../arm-none-eabi/bin/real-ld.exe: warning: c:/nxp/s32ds.3.6.3/s32ds/build_tools/gcc_v10.2/gcc-10.2-arm32-eabi/bin/../lib/gcc/arm-none-eabi/10.2.0/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard\libc_nano.a(lib_a-memmove.o) uses variable-size enums yet the output is to use 32-bit enums; use of enum values across objects may fail
c:/nxp/s32ds.3.6.3/s32ds/build_tools/gcc_v10.2/gcc-10.2-arm32-eabi/bin/../lib/gcc/arm-none-eabi/10.2.0/../../../../arm-none-eabi/bin/real-ld.exe: warning: c:/nxp/s32ds.3.6.3/s32ds/build_tools/gcc_v10.2/gcc-10.2-arm32-eabi/bin/../lib/gcc/arm-none-eabi/10.2.0/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard\libc_nano.a(lib_a-memset.o) uses variable-size enums yet the output is to use 32-bit enums; use of enum values across objects may fail
Finished building target: TestUART.elf
Invoking: Standard S32DS Print Size
arm-none-eabi-size --format=berkeley TestUART.elf
text data bss dec hex filename
27164 4 3520 30688 77e0 TestUART.elf
Finished building: TestUART.siz
10:39:01 Build Finished. 0 errors, 0 warnings. (took 55s.144ms)
2.烧录实现
2.1点击右上角“Debug Configurations …”;

2.2点击“Debugger”,“Device name”输入“S32K312”,“Interface”选择“JTAG”,“Executable name”输入“${S32DS_GDB_ARM32_EXE}”,点击“Apply”;

2.3点击“Debug”,若显示下属内容则为Debug成功。

3.效果演示
3.1串口连接大联大控股世平集团WPI-NXP S32K312 DVK核心板PTC2及PTC3引脚,若显示如下图则为成功。

更多推荐



所有评论(0)