-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
mimxrt: Five small service type changes. #9137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
e5f7ea6
mimxrt: Drop a few commented lines in machine_uart.c.
robert-hh 2fda243
mimxrt: Format the firmware image to match the new teensy loader.
robert-hh d5ea1d5
mimxrt: Allow a setting of -1 for cs in the constructor.
robert-hh 6730c39
mimxrt: Set the uart ioctl write poll flag properly.
robert-hh a77a47a
mimxrt: Implement the review comments.
robert-hh e435583
mimxrt: Fix a bug in uart.write().
robert-hh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/* | ||
* Copyright 2017 NXP | ||
* All rights reserved. | ||
* | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/ | ||
|
||
#include "fsl_flexspi_nor_boot.h" | ||
extern unsigned long _flashimagelen; | ||
extern unsigned long __etext; | ||
|
||
/* Component ID definition, used by tools. */ | ||
#ifndef FSL_COMPONENT_ID | ||
#define FSL_COMPONENT_ID "platform.drivers.xip_device" | ||
#endif | ||
|
||
#if defined(XIP_BOOT_HEADER_ENABLE) && (XIP_BOOT_HEADER_ENABLE == 1) | ||
#if defined(__CC_ARM) || defined(__ARMCC_VERSION) || defined(__GNUC__) | ||
__attribute__((section(".boot_hdr.ivt"))) | ||
#elif defined(__ICCARM__) | ||
#pragma location=".boot_hdr.ivt" | ||
#endif | ||
|
||
|
||
/************************************* | ||
* IVT Data | ||
*************************************/ | ||
const ivt image_vector_table = { | ||
IVT_HEADER, /* IVT Header */ | ||
IMAGE_ENTRY_ADDRESS, /* Image Entry Function */ | ||
IVT_RSVD, /* Reserved = 0 */ | ||
(uint32_t)DCD_ADDRESS, /* Address where DCD information is stored */ | ||
(uint32_t)BOOT_DATA_ADDRESS, /* Address where BOOT Data Structure is stored */ | ||
(uint32_t)&image_vector_table, /* Pointer to IVT Self (absolute address */ | ||
(uint32_t)CSF_ADDRESS, /* Address where CSF file is stored */ | ||
IVT_RSVD /* Reserved = 0 */ | ||
}; | ||
|
||
#if defined(__CC_ARM) || defined(__ARMCC_VERSION) || defined(__GNUC__) | ||
__attribute__((section(".boot_hdr.boot_data"))) | ||
#elif defined(__ICCARM__) | ||
#pragma location=".boot_hdr.boot_data" | ||
#endif | ||
/************************************* | ||
* Boot Data | ||
*************************************/ | ||
const BOOT_DATA_T boot_data = { | ||
FLASH_BASE 6D47 , /* boot start location */ | ||
(uint32_t)&_flashimagelen, /* Image size */ | ||
PLUGIN_FLAG, /* Plugin flag*/ | ||
0xFFFFFFFF /* empty - extra data word */ | ||
}; | ||
#endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
/* | ||
* Copyright 2017 NXP | ||
* All rights reserved. | ||
* | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/ | ||
|
||
#ifndef __FLEXSPI_NOR_BOOT_H__ | ||
#define __FLEXSPI_NOR_BOOT_H__ | ||
|
||
#include <stdint.h> | ||
#include "board.h" | ||
|
||
/*! @name Driver version */ | ||
/*@{*/ | ||
/*! @brief XIP_DEVICE driver version 2.0.0. */ | ||
#define FSL_XIP_DEVICE_DRIVER_VERSION (MAKE_VERSION(2, 0, 0)) | ||
/*@}*/ | ||
|
||
/************************************* | ||
* IVT Data | ||
*************************************/ | ||
typedef struct _ivt_ { | ||
/** @ref hdr with tag #HAB_TAG_IVT, length and HAB version fields | ||
* (see @ref data) | ||
*/ | ||
uint32_t hdr; | ||
/** Absolute address of the first instruction to execute from the | ||
* image | ||
*/ | ||
uint32_t entry; | ||
/** Reserved in this version of HAB: should be NULL. */ | ||
uint32_t reserved1; | ||
/** Absolute address of the image DCD: may be NULL. */ | ||
uint32_t dcd; | ||
/** Absolute address of the Boot Data: may be NULL, but not interpreted | ||
* any further by HAB | ||
*/ | ||
uint32_t boot_data; | ||
/** Absolute address of the IVT.*/ | ||
uint32_t self; | ||
/** Absolute address of the image CSF.*/ | ||
uint32_t csf; | ||
/** Reserved in this version of HAB: should be zero. */ | ||
uint32_t reserved2; | ||
} ivt; | ||
|
||
#define IVT_MAJOR_VERSION 0x4 | ||
#define IVT_MAJOR_VERSION_SHIFT 0x4 | ||
#define IVT_MAJOR_VERSION_MASK 0xF | ||
#define IVT_MINOR_VERSION 0x3 | ||
#define IVT_MINOR_VERSION_SHIFT 0x0 | ||
#define IVT_MINOR_VERSION_MASK 0xF | ||
|
||
#define IVT_VERSION(major, minor) \ | ||
((((major) & IVT_MAJOR_VERSION_MASK) << IVT_MAJOR_VERSION_SHIFT) | \ | ||
(((minor) & IVT_MINOR_VERSION_MASK) << IVT_MINOR_VERSION_SHIFT)) | ||
|
||
/* IVT header */ | ||
#define IVT_TAG_HEADER 0xD1 /**< Image Vector Table */ | ||
#define IVT_SIZE 0x2000 | ||
#define IVT_PAR IVT_VERSION(IVT_MAJOR_VERSION, IVT_MINOR_VERSION) | ||
#define IVT_HEADER (IVT_TAG_HEADER | (IVT_SIZE << 8) | (IVT_PAR << 24)) | ||
|
||
/* Set resume entry */ | ||
#if defined(__CC_ARM) || defined(__ARMCC_VERSION) | ||
extern uint32_t __Vectors[]; | ||
extern uint32_t Image$$RW_m_config_text$$Base[]; | ||
#define IMAGE_ENTRY_ADDRESS ((uint32_t)__Vectors) | ||
#define FLASH_BASE ((uint32_t)Image$$RW_m_config_text$$Base) | ||
#elif defined(__MCUXPRESSO) | ||
extern uint32_t __Vectors[]; | ||
extern uint32_t __boot_hdr_start__[]; | ||
#define IMAGE_ENTRY_ADDRESS ((uint32_t)__Vectors) | ||
#define FLASH_BASE ((uint32_t)__boot_hdr_start__) | ||
#elif defined(__ICCARM__) | ||
extern uint32_t __VECTOR_TABLE[]; | ||
extern uint32_t m_boot_hdr_conf_start[]; | ||
#define IMAGE_ENTRY_ADDRESS ((uint32_t)__VECTOR_TABLE) | ||
#define FLASH_BASE ((uint32_t)m_boot_hdr_conf_start) | ||
#elif defined(__GNUC__) | ||
extern uint32_t __VECTOR_TABLE[]; | ||
extern uint32_t __FLASH_BASE[]; | ||
#define IMAGE_ENTRY_ADDRESS ((uint32_t)__VECTOR_TABLE) | ||
#define FLASH_BASE ((uint32_t)__FLASH_BASE) | ||
#endif | ||
|
||
#define DCD_ADDRESS dcd_data | ||
#define BOOT_DATA_ADDRESS &boot_data | ||
#define CSF_ADDRESS 0 | ||
#define IVT_RSVD (uint32_t)(0x00000000) | ||
|
||
/************************************* | ||
* Boot Data | ||
*************************************/ | ||
typedef struct _boot_data_ { | ||
uint32_t start; /* boot start location */ | ||
uint32_t size; /* size */ | ||
uint32_t plugin; /* plugin flag - 1 if downloaded application is plugin */ | ||
uint32_t placeholder; /* placehoder to make even 0x10 size */ | ||
}BOOT_DATA_T; | ||
|
||
#if defined(BOARD_FLASH_SIZE) | ||
#define FLASH_SIZE BOARD_FLASH_SIZE | ||
#else | ||
#error "Please define macro BOARD_FLASH_SIZE" | ||
#endif | ||
#define PLUGIN_FLAG (uint32_t)0 | ||
|
||
/* External Variables */ | ||
const BOOT_DATA_T boot_data; | ||
extern const uint8_t dcd_data[]; | ||
|
||
#endif /* __FLEXSPI_NOR_BOOT_H__ */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.