mirror of
https://github.com/eclipse-threadx/levelx.git
synced 2026-09-14 20:48:51 +08:00
Compare commits
7
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6eadbd6d97 | ||
|
|
f11f115a41 | ||
|
|
ce04276ace | ||
|
|
6b20a667e3 | ||
|
|
2af719ed1a | ||
|
|
71a3152556 | ||
|
|
d5a5b7f13e |
+16
-2
@@ -1,6 +1,6 @@
|
||||
LICENSED HARDWARE LIST
|
||||
|
||||
Last Updated: 2020-09-22
|
||||
Last Updated: 2020-12-15
|
||||
|
||||
Microsoft has entered into OEM Agreements with manufacturers of the following
|
||||
microprocessors and microcontrollers (the “hardware”) to enable those
|
||||
@@ -11,12 +11,26 @@ Production Use” rights in Section 2 of the Microsoft Software License Terms fo
|
||||
Microsoft Azure RTOS. If hardware is not listed below, you do not have those
|
||||
rights.
|
||||
|
||||
|
||||
STMicroelectronics:
|
||||
|
||||
STM32 MCUs
|
||||
STM32 MPUs
|
||||
|
||||
MediaTek:
|
||||
|
||||
MT3620 MCU (Azure Sphere)
|
||||
|
||||
Microchip:
|
||||
|
||||
PIC 32-bit MCUs
|
||||
SAM 32-bit MCUs
|
||||
SAM 32-bit MPUs
|
||||
|
||||
NXP:
|
||||
|
||||
NXP i.MX RT10xx series crossover MCUs
|
||||
|
||||
Renesas:
|
||||
|
||||
Synergy Platform
|
||||
@@ -25,4 +39,4 @@ Renesas:
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
More coming soon. Please check back frequently for updates.
|
||||
More coming soon. Please check back frequently for updates.
|
||||
|
||||
+36
-2
@@ -26,7 +26,7 @@
|
||||
/* APPLICATION INTERFACE DEFINITION RELEASE */
|
||||
/* */
|
||||
/* lx_api.h PORTABLE C */
|
||||
/* 6.1 */
|
||||
/* 6.1.3 */
|
||||
/* AUTHOR */
|
||||
/* */
|
||||
/* William E. Lamie, Microsoft Corporation */
|
||||
@@ -45,6 +45,13 @@
|
||||
/* 09-30-2020 William E. Lamie Modified comment(s), and */
|
||||
/* updated product constants, */
|
||||
/* resulting in version 6.1 */
|
||||
/* 11-09-2020 William E. Lamie Modified comment(s), and */
|
||||
/* added support for lx_user.h */
|
||||
/* so user can specify values, */
|
||||
/* resulting in version 6.1.2 */
|
||||
/* 12-31-2020 William E. Lamie Modified comment(s), and */
|
||||
/* updated product constants, */
|
||||
/* resulting in version 6.1.3 */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
|
||||
@@ -52,10 +59,32 @@
|
||||
#define LX_API_H
|
||||
|
||||
|
||||
/* Determine if a C++ compiler is being used. If so, ensure that standard
|
||||
C is used to process the API information. */
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
/* Yes, C++ compiler is present. Use standard C. */
|
||||
extern "C" {
|
||||
|
||||
#endif
|
||||
|
||||
/* Include necessary system files. */
|
||||
|
||||
#include "tx_api.h"
|
||||
|
||||
/* Determine if the optional LevelX user define file should be used. */
|
||||
|
||||
#ifdef LX_INCLUDE_USER_DEFINE_FILE
|
||||
|
||||
|
||||
/* Yes, include the user defines in lx_user.h. The defines in this file may
|
||||
alternately be defined on the command line. */
|
||||
|
||||
#include "lx_user.h"
|
||||
#endif
|
||||
|
||||
|
||||
/* Disable warning of parameter not used. */
|
||||
#ifndef LX_PARAMETER_NOT_USED
|
||||
#define LX_PARAMETER_NOT_USED(p) ((void)(p))
|
||||
@@ -66,7 +95,7 @@
|
||||
#define AZURE_RTOS_LEVELX
|
||||
#define LEVELX_MAJOR_VERSION 6
|
||||
#define LEVELX_MINOR_VERSION 1
|
||||
#define LEVELX_PATCH_VERSION 0
|
||||
#define LEVELX_PATCH_VERSION 3
|
||||
|
||||
|
||||
/* Define general LevelX Constants. */
|
||||
@@ -536,5 +565,10 @@ UINT _lx_nor_flash_physical_sector_allocate(LX_NOR_FLASH *nor_flash, ULONG lo
|
||||
VOID _lx_nor_flash_sector_mapping_cache_invalidate(LX_NOR_FLASH *nor_flash, ULONG logical_sector);
|
||||
VOID _lx_nor_flash_system_error(LX_NOR_FLASH *nor_flash, UINT error_code);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* Copyright (c) Microsoft Corporation. All rights reserved. */
|
||||
/* */
|
||||
/* This software is licensed under the Microsoft Software License */
|
||||
/* Terms for Microsoft Azure RTOS. Full text of the license can be */
|
||||
/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
|
||||
/* and in the root directory of this software. */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
/** */
|
||||
/** LevelX Component */
|
||||
/** */
|
||||
/** User Specific */
|
||||
/** */
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* PORT SPECIFIC C INFORMATION RELEASE */
|
||||
/* */
|
||||
/* lx_user.h PORTABLE C */
|
||||
/* 6.1.2 */
|
||||
/* */
|
||||
/* AUTHOR */
|
||||
/* */
|
||||
/* William E. Lamie, Microsoft Corporation */
|
||||
/* */
|
||||
/* DESCRIPTION */
|
||||
/* */
|
||||
/* This file contains user defines for configuring LevelX in specific */
|
||||
/* ways. This file will have an effect only if the application and */
|
||||
/* LevelX library are built with LX_INCLUDE_USER_DEFINE_FILE defined. */
|
||||
/* Note that all the defines in this file may also be made on the */
|
||||
/* command line when building LevelX library and application objects. */
|
||||
/* */
|
||||
/* RELEASE HISTORY */
|
||||
/* */
|
||||
/* DATE NAME DESCRIPTION */
|
||||
/* */
|
||||
/* 11-09-2020 William E. Lamie Initial Version 6.1.2 */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
|
||||
#ifndef LX_USER_H
|
||||
#define LX_USER_H
|
||||
|
||||
|
||||
|
||||
/* Defined, this option bypasses the NOR flash driver read routine in favor or reading
|
||||
the NOR memory directly, resulting in a significant performance increase.
|
||||
*/
|
||||
/*
|
||||
#define LX_DIRECT_READ
|
||||
*/
|
||||
|
||||
|
||||
/* Defined, this causes the LevelX NOR instance open logic to verify free NOR
|
||||
sectors are all ones.
|
||||
*/
|
||||
/*
|
||||
#define LX_FREE_SECTOR_DATA_VERIFY
|
||||
*/
|
||||
|
||||
/* By default this value is 128 and defines the logical sector mapping cache size.
|
||||
Large values improve performance, but cost memory. The minimum size is 8 and
|
||||
all values must be a power of 2.
|
||||
*/
|
||||
/*
|
||||
#define LX_NAND_SECTOR_MAPPING_CACHE_SIZE 128
|
||||
*/
|
||||
|
||||
/* Defined, this creates a direct mapping cache, such that there are no cache misses.
|
||||
It also requires that LX_NAND_SECTOR_MAPPING_CACHE_SIZE represents the exact number
|
||||
of total pages in your flash device.
|
||||
*/
|
||||
/*
|
||||
#define LX_NAND_FLASH_DIRECT_MAPPING_CACHE
|
||||
*/
|
||||
|
||||
|
||||
/* Defined, this disabled the extended NOR cache. */
|
||||
/*
|
||||
#define LX_NOR_DISABLE_EXTENDED_CACHE
|
||||
*/
|
||||
|
||||
/* By default this value is 8, which represents a maximum of 8 sectors that
|
||||
can be cached in a NOR instance.
|
||||
*/
|
||||
/*
|
||||
#define LX_NOR_EXTENDED_CACHE_SIZE 8
|
||||
*/
|
||||
|
||||
|
||||
/* By default this value is 16 and defines the logical sector mapping cache size.
|
||||
Large values improve performance, but cost memory. The minimum size is 8 and all
|
||||
values must be a power of 2.
|
||||
*/
|
||||
/*
|
||||
#define LX_NOR_SECTOR_MAPPING_CACHE_SIZE 16
|
||||
*/
|
||||
|
||||
/* Defined, this makes LevelX thread-safe by using a ThreadX mutex object
|
||||
throughout the API.
|
||||
*/
|
||||
/*
|
||||
#define LX_THREAD_SAFE_ENABLE
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
/* FUNCTION RELEASE */
|
||||
/* */
|
||||
/* _lx_nor_flash_extended_cache_enable PORTABLE C */
|
||||
/* 6.1 */
|
||||
/* 6.1.3 */
|
||||
/* AUTHOR */
|
||||
/* */
|
||||
/* William E. Lamie, Microsoft Corporation */
|
||||
@@ -74,6 +74,9 @@
|
||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
||||
/* 09-30-2020 William E. Lamie Modified comment(s), */
|
||||
/* resulting in version 6.1 */
|
||||
/* 12-31-2020 William E. Lamie Modified comment(s), */
|
||||
/* fixed compiler warnings, */
|
||||
/* resulting in version 6.1.3 */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
UINT _lx_nor_flash_extended_cache_enable(LX_NOR_FLASH *nor_flash, VOID *memory, ULONG size)
|
||||
@@ -141,6 +144,10 @@ ULONG *cache_memory;
|
||||
return(LX_SUCCESS);
|
||||
#else
|
||||
|
||||
LX_PARAMETER_NOT_USED(nor_flash);
|
||||
LX_PARAMETER_NOT_USED(memory);
|
||||
LX_PARAMETER_NOT_USED(size);
|
||||
|
||||
/* Return disabled error message. */
|
||||
return(LX_DISABLED);
|
||||
#endif
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
/* FUNCTION RELEASE */
|
||||
/* */
|
||||
/* _lx_nor_flash_open PORTABLE C */
|
||||
/* 6.1 */
|
||||
/* 6.1.3 */
|
||||
/* AUTHOR */
|
||||
/* */
|
||||
/* William E. Lamie, Microsoft Corporation */
|
||||
@@ -83,6 +83,12 @@
|
||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
||||
/* 09-30-2020 William E. Lamie Modified comment(s), */
|
||||
/* resulting in version 6.1 */
|
||||
/* 11-09-2020 William E. Lamie Modified comment(s), */
|
||||
/* fixed compiler warnings, */
|
||||
/* resulting in version 6.1.2 */
|
||||
/* 12-30-2020 William E. Lamie Modified comment(s), */
|
||||
/* fixed compiler warnings, */
|
||||
/* resulting in version 6.1.3 */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
UINT _lx_nor_flash_open(LX_NOR_FLASH *nor_flash, CHAR *name, UINT (*nor_driver_initialize)(LX_NOR_FLASH *))
|
||||
@@ -101,7 +107,7 @@ ULONG used_sectors;
|
||||
ULONG *new_map_entry;
|
||||
ULONG *new_sector_address;
|
||||
ULONG erased_count, min_erased_count, max_erased_count, temp_erased_count;
|
||||
ULONG i, j, k;
|
||||
ULONG j, k, l;
|
||||
UINT status;
|
||||
#ifdef LX_FREE_SECTOR_DATA_VERIFY
|
||||
ULONG *sector_word_ptr;
|
||||
@@ -208,7 +214,7 @@ TX_INTERRUPT_SAVE_AREA
|
||||
block_word_ptr = nor_flash -> lx_nor_flash_base_address;
|
||||
|
||||
/* Loop through the blocks to determine the minimum and maximum erase count. */
|
||||
for (i = 0; i < nor_flash -> lx_nor_flash_total_blocks; i++)
|
||||
for (l = 0; l < nor_flash -> lx_nor_flash_total_blocks; l++)
|
||||
{
|
||||
|
||||
/* Pickup the first word of the block. If the flash manager has executed before, this word contains the
|
||||
@@ -277,7 +283,7 @@ TX_INTERRUPT_SAVE_AREA
|
||||
block_word_ptr = nor_flash -> lx_nor_flash_base_address;
|
||||
|
||||
/* Loop through the blocks to setup the flash the fist time. */
|
||||
for (i = 0; i < nor_flash -> lx_nor_flash_total_blocks; i++)
|
||||
for (l = 0; l < nor_flash -> lx_nor_flash_total_blocks; l++)
|
||||
{
|
||||
|
||||
/* Setup the free bit map that corresponds to the free physical sectors in this
|
||||
@@ -338,7 +344,7 @@ TX_INTERRUPT_SAVE_AREA
|
||||
block_word_ptr = nor_flash -> lx_nor_flash_base_address;
|
||||
|
||||
/* Loop through the blocks. */
|
||||
for (i = 0; i < nor_flash -> lx_nor_flash_total_blocks; i++)
|
||||
for (l = 0; l < nor_flash -> lx_nor_flash_total_blocks; l++)
|
||||
{
|
||||
|
||||
/* First, determine if this block has a valid erase count. */
|
||||
@@ -384,7 +390,7 @@ TX_INTERRUPT_SAVE_AREA
|
||||
nor_flash -> lx_nor_flash_diagnostic_erased_block++;
|
||||
|
||||
/* Check to see if the block is erased. */
|
||||
status = (nor_flash -> lx_nor_flash_driver_block_erased_verify)(i);
|
||||
status = (nor_flash -> lx_nor_flash_driver_block_erased_verify)(l);
|
||||
|
||||
/* Is the block completely erased? */
|
||||
if (status != LX_SUCCESS)
|
||||
@@ -406,7 +412,7 @@ TX_INTERRUPT_SAVE_AREA
|
||||
nor_flash -> lx_nor_flash_diagnostic_re_erase_block++;
|
||||
|
||||
/* No, the block is not fully erased, erase it again. */
|
||||
status = _lx_nor_flash_driver_block_erase(nor_flash, i, max_erased_count);
|
||||
status = _lx_nor_flash_driver_block_erase(nor_flash, l, max_erased_count);
|
||||
|
||||
/* Check for an error from flash driver. Drivers should never return an error.. */
|
||||
if (status)
|
||||
@@ -511,7 +517,7 @@ TX_INTERRUPT_SAVE_AREA
|
||||
{
|
||||
|
||||
/* Remember the block with free sectors. */
|
||||
nor_flash -> lx_nor_flash_free_block_search = i;
|
||||
nor_flash -> lx_nor_flash_free_block_search = l;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -748,7 +754,7 @@ TX_INTERRUPT_SAVE_AREA
|
||||
/* Read the word directly. */
|
||||
sector_word = *(sector_word_ptr);
|
||||
#else
|
||||
status = _lx_nor_flash_driver_read((sector_word_ptr), §or_word, 1);
|
||||
status = _lx_nor_flash_driver_read(nor_flash, (sector_word_ptr), §or_word, 1);
|
||||
|
||||
/* Check for an error from flash driver. Drivers should never return an error.. */
|
||||
if (status)
|
||||
|
||||
Reference in New Issue
Block a user