frdm k64f usb work well, add kinetis_k to ci cmake

This commit is contained in:
hathach
2024-02-24 00:36:07 +07:00
parent a1bfde83fb
commit 3d3bf45102
8 changed files with 60 additions and 19 deletions

View File

@@ -732,15 +732,27 @@
</dcdx>
<periphs name="Peripherals" version="13.0" enabled="true" update_project_code="true">
<dependencies>
<dependency resourceType="Tool" resourceId="Clocks" description="The Clocks tool is required by the Peripherals tool, but it is disabled." problem_level="2" source="Peripherals">
<dependency resourceType="SWComponent" resourceId="middleware.usb.common_header" description="USB Common Header is not found in the toolchain/IDE project. The project will not compile!" problem_level="2" source="Peripherals">
<feature name="enabled" evaluation="equal">
<data>true</data>
<data type="Boolean">true</data>
</feature>
</dependency>
<dependency resourceType="SWComponent" resourceId="middleware.usb.common_header" description="An unsupported version of the USB Common Header in the toolchain/IDE project. Required: ${required_value}, actual: ${actual_value}. The project might not compile correctly." problem_level="1" source="Peripherals">
<feature name="version" evaluation="compatible">
<data type="Version">2.8.0</data>
</feature>
</dependency>
</dependencies>
<generated_project_files>
<file path="board/peripherals.c" update_enabled="true"/>
<file path="board/peripherals.h" update_enabled="true"/>
<file path="source/generated/usb_device_composite.c" update_enabled="true"/>
<file path="source/generated/usb_device_composite.h" update_enabled="true"/>
<file path="source/generated/usb_device_config.h" update_enabled="true"/>
<file path="source/generated/usb_device_descriptor.c" update_enabled="true"/>
<file path="source/generated/usb_device_descriptor.h" update_enabled="true"/>
<file path="source/usb_device_interface_0_cic_vcom.c" update_enabled="true"/>
<file path="source/usb_device_interface_0_cic_vcom.h" update_enabled="true"/>
</generated_project_files>
<peripherals_profile>
<processor_version>14.0.0</processor_version>
@@ -755,6 +767,31 @@
<data type="Boolean">true</data>
</feature>
</dependency>
<dependency resourceType="SWComponent" resourceId="middleware.usb.device_controller_khci" description="&quot;USB Device KHCI Controller Driver(FS)&quot; component is missing in the project." problem_level="2" source="Peripherals:BOARD_InitPeripherals">
<feature name="enabled" evaluation="equal">
<data type="Boolean">true</data>
</feature>
</dependency>
<dependency resourceType="SWComponent" resourceId="platform.drivers.common" description="&quot;Common&quot; driver is missing in the project." problem_level="2" source="Peripherals:BOARD_InitPeripherals">
<feature name="enabled" evaluation="equal">
<data type="Boolean">true</data>
</feature>
</dependency>
<dependency resourceType="ClockOutput" resourceId="USB48MCLK" description="USB Function Clock (USB48MCLK) is inactive and USB module will not work." problem_level="2" source="Peripherals:BOARD_InitPeripherals">
<feature name="frequency" evaluation="greaterThan">
<data type="Frequency" unit="Hz">0</data>
</feature>
</dependency>
<dependency resourceType="SWComponent" resourceId="middleware.usb.device.cdc.external" description="&quot;USB device CDC&quot; driver is missing in the project." problem_level="2" source="Peripherals:BOARD_InitPeripherals">
<feature name="enabled" evaluation="equal">
<data type="Boolean">true</data>
</feature>
</dependency>
<dependency resourceType="SWComponent" resourceId="middleware.usb.device.cdc.external" description="&quot;USB device CDC&quot; driver is missing in the project." problem_level="2" source="Peripherals:BOARD_InitPeripherals">
<feature name="enabled" evaluation="equal">
<data type="Boolean">true</data>
</feature>
</dependency>
</dependencies>
<instances>
<instance name="NVIC" uuid="e1a88231-4d9e-46a3-b134-d2c743110640" type="nvic" type_id="nvic_57b5eef3774cc60acaede6f5b8bddc67" mode="general" peripheral="NVIC" enabled="true" comment="" custom_name_enabled="false" editing_lock="false">
@@ -789,7 +826,7 @@
<setting name="mpuInit" value="disabled"/>
</config_set>
</instance>
<instance name="USB0" uuid="cc0eb411-8fed-4548-b79c-9a8340cc02fd" type="usb" type_id="usb_cbf31fb9a3cef21890d93e737c3d2690" mode="device" peripheral="USB0" enabled="false" comment="" custom_name_enabled="false" editing_lock="false">
<instance name="USB0" uuid="cc0eb411-8fed-4548-b79c-9a8340cc02fd" type="usb" type_id="usb_cbf31fb9a3cef21890d93e737c3d2690" mode="device" peripheral="USB0" enabled="true" comment="" custom_name_enabled="false" editing_lock="false">
<config_set name="deviceSetting" quick_selection="QS_DEVICE_CDC_VCOM">
<setting name="vendor_id" value="0x1FC9"/>
<setting name="product_id" value="0x0094"/>

View File

@@ -30,6 +30,7 @@
#include "fsl_port.h"
#include "fsl_clock.h"
#include "fsl_uart.h"
#include "fsl_sysmpu.h"
#include "board/clock_config.h"
#include "board/pin_mux.h"
@@ -50,6 +51,7 @@ void board_init(void) {
BOARD_InitBootPins();
BOARD_BootClockRUN();
SystemCoreClockUpdate();
SYSMPU_Enable(SYSMPU, 0);
#if CFG_TUSB_OS == OPT_OS_NONE
// 1ms tick timer
@@ -84,7 +86,7 @@ void board_init(void) {
#endif
// USB
CLOCK_EnableUsbfs0Clock(kCLOCK_UsbSrcPll0, CLOCK_GetFreq(kCLOCK_PllFllSelClk));
// USB clock is configured in BOARD_BootClockRUN()
}
//--------------------------------------------------------------------+

View File

@@ -40,6 +40,7 @@ function(add_board_target BOARD_TARGET)
${SDK_DIR}/drivers/gpio
${SDK_DIR}/drivers/port
${SDK_DIR}/drivers/smc
${SDK_DIR}/drivers/sysmpu
${SDK_DIR}/drivers/uart
)

View File

@@ -29,6 +29,7 @@ INC += \
$(TOP)/$(SDK_DIR)/drivers/gpio \
$(TOP)/$(SDK_DIR)/drivers/port \
$(TOP)/$(SDK_DIR)/drivers/smc \
$(TOP)/$(SDK_DIR)/drivers/sysmpu \
$(TOP)/$(SDK_DIR)/drivers/uart \
SRC_S += ${SDK_DIR}/devices/${MCU_VARIANT}/gcc/startup_${MCU_VARIANT}.S