mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-03-27 09:32:28 +08:00
[fix]mimxrt1170 Qspi flash bootup problems (#6215)
[fix]mimxrt1170 Qspi flash bootup problems by loss of external flash conf and ivt header. [add]green light instead printf on main.c.
This commit is contained in:
@@ -11,14 +11,20 @@
|
||||
|
||||
#include <rtthread.h>
|
||||
#include <rtdevice.h>
|
||||
#include "drv_gpio.h"
|
||||
#include <drv_gpio.h>
|
||||
#include <fsl_gpio.h>
|
||||
|
||||
#define EXAMPLE_LED_GPIO GPIO9
|
||||
#define EXAMPLE_LED_GPIO_PIN (3U)
|
||||
|
||||
int main(void)
|
||||
{
|
||||
while (1)
|
||||
{
|
||||
rt_kprintf("test\r\n");
|
||||
rt_thread_mdelay(500);
|
||||
GPIO_PinWrite(EXAMPLE_LED_GPIO, EXAMPLE_LED_GPIO_PIN, 0U);
|
||||
rt_thread_mdelay(500);
|
||||
GPIO_PinWrite(EXAMPLE_LED_GPIO, EXAMPLE_LED_GPIO_PIN, 1U);
|
||||
rt_thread_mdelay(500);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ processor_version: 0.9.6
|
||||
|
||||
#include "fsl_common.h"
|
||||
#include "fsl_iomuxc.h"
|
||||
#include "fsl_gpio.h"
|
||||
#include "pin_mux.h"
|
||||
|
||||
/* FUNCTION ************************************************************************************************************
|
||||
@@ -57,7 +58,32 @@ BOARD_InitPins:
|
||||
* END ****************************************************************************************************************/
|
||||
void BOARD_InitPins(void) {
|
||||
CLOCK_EnableClock(kCLOCK_Iomuxc); /* LPCG on: LPCG is ON. */
|
||||
CLOCK_EnableClock(kCLOCK_Iomuxc_Lpsr); /* LPCG on: LPCG is ON. */
|
||||
|
||||
/* GPIO configuration on GPIO_AD_04 (pin M13) */
|
||||
gpio_pin_config_t gpio9_pinM13_config = {
|
||||
.direction = kGPIO_DigitalOutput,
|
||||
.outputLogic = 0U,
|
||||
.interruptMode = kGPIO_NoIntmode
|
||||
};
|
||||
/* Initialize GPIO functionality on GPIO_AD_04 (pin M13) */
|
||||
GPIO_PinInit(GPIO9, 3U, &gpio9_pinM13_config);
|
||||
|
||||
/* GPIO configuration on GPIO_AD_26 (pin L14) */
|
||||
gpio_pin_config_t gpio9_pinL14_config = {
|
||||
.direction = kGPIO_DigitalOutput,
|
||||
.outputLogic = 0U,
|
||||
.interruptMode = kGPIO_NoIntmode
|
||||
};
|
||||
/* Initialize GPIO functionality on GPIO_AD_04 (pin L14) */
|
||||
GPIO_PinInit(GPIO9, 25U, &gpio9_pinL14_config);
|
||||
|
||||
IOMUXC_SetPinMux(
|
||||
IOMUXC_GPIO_AD_04_GPIO9_IO03, /* GPIO_AD_04 is configured as GPIO9_IO03 */
|
||||
0U);
|
||||
IOMUXC_SetPinMux(
|
||||
IOMUXC_GPIO_AD_26_GPIO9_IO25, /* GPIO_AD_04 is configured as GPIO9_IO03 */
|
||||
0U);
|
||||
IOMUXC_SetPinMux(
|
||||
IOMUXC_GPIO_AD_24_LPUART1_TXD, /* GPIO_AD_24 is configured as LPUART1_TXD */
|
||||
0U); /* Software Input On Field: Input Path is determined by functionality */
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -8,10 +8,11 @@ if GetDepend('BSP_USING_QSPIFLASH'):
|
||||
CPPPATH = [cwd]
|
||||
|
||||
if rtconfig.CROSS_TOOL == 'keil':
|
||||
LINKFLAGS = '--keep=*(.boot_hdr.ivt)'
|
||||
LINKFLAGS += '--keep=*(.boot_hdr.boot_data)'
|
||||
LINKFLAGS += '--keep=*(.boot_hdr.dcd_data)'
|
||||
LINKFLAGS += '--keep=*(.boot_hdr.conf)'
|
||||
LINKFLAGS = ' --keep=*(.boot_hdr.ivt)'
|
||||
LINKFLAGS += ' --keep=*(.boot_hdr.boot_data)'
|
||||
LINKFLAGS += ' --keep=*(.boot_hdr.dcd_data)'
|
||||
LINKFLAGS += ' --keep=*(.boot_hdr.conf)'
|
||||
LINKFLAGS += ' --predefine="-DXIP_BOOT_HEADER_ENABLE=1"'
|
||||
else:
|
||||
LINKFLAGS = ''
|
||||
|
||||
|
||||
Reference in New Issue
Block a user