cannot get IAR work with lpc1769 device demo

This commit is contained in:
hathach 2014-03-10 15:02:11 +07:00
parent b586fe632a
commit 3555abc378
12 changed files with 118 additions and 152 deletions

View File

@ -362,7 +362,7 @@
</option>
<option>
<name>IccAllowVLA</name>
<state>1</state>
<state>0</state>
</option>
<option>
<name>IccCppDialect</name>
@ -1025,7 +1025,7 @@
</option>
<option>
<name>GenLowLevelInterface</name>
<state>0</state>
<state>1</state>
</option>
<option>
<name>GEndianModeBE</name>
@ -1069,7 +1069,7 @@
</option>
<option>
<name>OGUseCmsis</name>
<state>1</state>
<state>0</state>
</option>
<option>
<name>OGUseCmsisDspLib</name>

View File

@ -57,8 +57,8 @@ OSAL_SEM_DEF(cdcd_semaphore);
static osal_semaphore_handle_t sem_hdl;
ATTR_USB_MIN_ALIGNMENT static uint8_t serial_rx_buffer[CDCD_APP_BUFFER_SIZE] TUSB_CFG_ATTR_USBRAM;
ATTR_USB_MIN_ALIGNMENT static uint8_t serial_tx_buffer[CDCD_APP_BUFFER_SIZE] TUSB_CFG_ATTR_USBRAM;
TUSB_CFG_ATTR_USBRAM ATTR_USB_MIN_ALIGNMENT static uint8_t serial_rx_buffer[CDCD_APP_BUFFER_SIZE];
TUSB_CFG_ATTR_USBRAM ATTR_USB_MIN_ALIGNMENT static uint8_t serial_tx_buffer[CDCD_APP_BUFFER_SIZE];
//--------------------------------------------------------------------+
// INTERNAL OBJECT & FUNCTION DECLARATION

View File

@ -52,7 +52,7 @@
//--------------------------------------------------------------------+
OSAL_TASK_DEF(keyboardd_app_task, 128, KEYBOARDD_APP_TASK_PRIO);
ATTR_USB_MIN_ALIGNMENT hid_keyboard_report_t keyboard_report TUSB_CFG_ATTR_USBRAM;
TUSB_CFG_ATTR_USBRAM ATTR_USB_MIN_ALIGNMENT hid_keyboard_report_t keyboard_report;
//--------------------------------------------------------------------+
// tinyusb Callbacks

View File

@ -52,7 +52,7 @@
//--------------------------------------------------------------------+
OSAL_TASK_DEF(moused_app_task, 128, MOUSED_APP_TASK_PRIO);
ATTR_USB_MIN_ALIGNMENT hid_mouse_report_t mouse_report TUSB_CFG_ATTR_USBRAM;
TUSB_CFG_ATTR_USBRAM ATTR_USB_MIN_ALIGNMENT hid_mouse_report_t mouse_report;
//--------------------------------------------------------------------+
// tinyusb Callbacks

View File

@ -46,8 +46,8 @@
//--------------------------------------------------------------------+
// MACRO CONSTANT TYPEDEF
//--------------------------------------------------------------------+
ATTR_USB_MIN_ALIGNMENT
static scsi_inquiry_data_t mscd_inquiry_data TUSB_CFG_ATTR_USBRAM =
TUSB_CFG_ATTR_USBRAM ATTR_USB_MIN_ALIGNMENT
static scsi_inquiry_data_t mscd_inquiry_data =
{
.is_removable = 1,
.version = 2,
@ -57,23 +57,23 @@ static scsi_inquiry_data_t mscd_inquiry_data TUSB_CFG_ATTR_USBRAM =
.product_revision = "0.01"
};
ATTR_USB_MIN_ALIGNMENT
static scsi_read_capacity10_data_t mscd_read_capacity10_data TUSB_CFG_ATTR_USBRAM =
TUSB_CFG_ATTR_USBRAM ATTR_USB_MIN_ALIGNMENT
static scsi_read_capacity10_data_t mscd_read_capacity10_data =
{
.last_lba = ENDIAN_BE(DISK_BLOCK_NUM-1), // read capacity
.block_size = ENDIAN_BE(DISK_BLOCK_SIZE)
};
ATTR_USB_MIN_ALIGNMENT
scsi_sense_fixed_data_t mscd_sense_data TUSB_CFG_ATTR_USBRAM =
TUSB_CFG_ATTR_USBRAM ATTR_USB_MIN_ALIGNMENT
scsi_sense_fixed_data_t mscd_sense_data =
{
.response_code = 0x70,
.sense_key = 0, // no errors
.additional_sense_len = sizeof(scsi_sense_fixed_data_t) - 8
};
ATTR_USB_MIN_ALIGNMENT
static scsi_read_format_capacity_data_t mscd_format_capacity_data TUSB_CFG_ATTR_USBRAM =
TUSB_CFG_ATTR_USBRAM ATTR_USB_MIN_ALIGNMENT
static scsi_read_format_capacity_data_t mscd_format_capacity_data =
{
.list_length = 8,
.block_num = ENDIAN_BE(DISK_BLOCK_NUM), // write capacity
@ -81,8 +81,8 @@ static scsi_read_format_capacity_data_t mscd_format_capacity_data TUSB_CFG_ATTR_
.block_size_u16 = ENDIAN_BE16(DISK_BLOCK_SIZE)
};
ATTR_USB_MIN_ALIGNMENT
static scsi_mode_parameters_t msc_dev_mode_para TUSB_CFG_ATTR_USBRAM =
TUSB_CFG_ATTR_USBRAM ATTR_USB_MIN_ALIGNMENT
static scsi_mode_parameters_t msc_dev_mode_para =
{
.mode_data_length = 3,
.medium_type = 0,

View File

@ -47,8 +47,8 @@
//--------------------------------------------------------------------+
// INTERNAL OBJECT & FUNCTION DECLARATION
//--------------------------------------------------------------------+
ATTR_USB_MIN_ALIGNMENT
uint8_t mscd_app_ramdisk[DISK_BLOCK_NUM][DISK_BLOCK_SIZE] TUSB_CFG_ATTR_USBRAM =
TUSB_CFG_ATTR_USBRAM ATTR_USB_MIN_ALIGNMENT
uint8_t mscd_app_ramdisk[DISK_BLOCK_NUM][DISK_BLOCK_SIZE] =
{
//------------- Boot Sector -------------//
// byte_per_sector = DISK_BLOCK_SIZE; fat12_sector_num_16 = DISK_BLOCK_NUM;

View File

@ -91,8 +91,8 @@ const uint8_t mscd_app_rommdisk[DISK_BLOCK_NUM][DISK_BLOCK_SIZE] =
[3] = README_CONTENTS
};
ATTR_USB_MIN_ALIGNMENT
static uint8_t sector_buffer[DISK_BLOCK_SIZE] TUSB_CFG_ATTR_USBRAM;
ATTR_USB_MIN_ALIGNMENT TUSB_CFG_ATTR_USBRAM
static uint8_t sector_buffer[DISK_BLOCK_SIZE];
//--------------------------------------------------------------------+
// IMPLEMENTATION

View File

@ -99,8 +99,10 @@
#define TUSB_CFG_OS_TICKS_PER_SECOND 1000
#ifdef __CODE_RED // compiled with lpcxpresso
#if (TUSB_CFG_MCU == MCU_LPC11UXX) || (TUSB_CFG_MCU == MCU_LPC13UXX) || (TUSB_CFG_MCU == MCU_LPC175X_6X)
#if (TUSB_CFG_MCU == MCU_LPC11UXX) || (TUSB_CFG_MCU == MCU_LPC13UXX)
#define TUSB_RAM_SECTION ".data.$RAM2"
#elif
#define TUSB_CFG_MCU == MCU_LPC175X_6X // LPC17xx USB DMA can access all
#elif (TUSB_CFG_MCU == MCU_LPC43XX)
#define TUSB_RAM_SECTION ".data.$RAM3"
#else
@ -114,7 +116,7 @@
#if (TUSB_CFG_MCU == MCU_LPC11UXX) || (TUSB_CFG_MCU == MCU_LPC13UXX)
#define TUSB_CFG_ATTR_USBRAM __attribute__ ((section("USBRAM_SECTION")))
#elif (TUSB_CFG_MCU == MCU_LPC43XX)
#define TUSB_CFG_ATTR_USBRAM
#define TUSB_CFG_ATTR_USBRAM // Use keil tool configure to have AHB SRAM as default memory
#elif (TUSB_CFG_MCU == MCU_LPC175X_6X)
#define TUSB_CFG_ATTR_USBRAM
#else
@ -123,7 +125,11 @@
#elif __ICCARM__ // compiled with IAR
#define TUSB_CFG_ATTR_USBRAM _Pragma("location=\".ahb_sram1\"")
#if (TUSB_CFG_MCU == MCU_LPC43XX)
#define TUSB_CFG_ATTR_USBRAM _Pragma("location=\".ahb_sram1\"")
#elif (TUSB_CFG_MCU == MCU_LPC175X_6X)
#define TUSB_CFG_ATTR_USBRAM
#endif
#else

View File

@ -499,7 +499,7 @@
<OPTFL>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<IsCurrentTarget>1</IsCurrentTarget>
<IsCurrentTarget>0</IsCurrentTarget>
</OPTFL>
<CpuCode>8</CpuCode>
<Books>
@ -696,7 +696,7 @@
<OPTFL>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<IsCurrentTarget>0</IsCurrentTarget>
<IsCurrentTarget>1</IsCurrentTarget>
</OPTFL>
<CpuCode>8</CpuCode>
<Books>
@ -872,7 +872,7 @@
<Group>
<GroupName>app</GroupName>
<tvExp>0</tvExp>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
@ -898,10 +898,10 @@
<FileType>1</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<ColumnNumber>7</ColumnNumber>
<ColumnNumber>0</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>139</TopLine>
<CurrentLine>139</CurrentLine>
<TopLine>1</TopLine>
<CurrentLine>1</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\src\cdc_serial_app.c</PathWithFileName>
<FilenameWithoutPath>cdc_serial_app.c</FilenameWithoutPath>
@ -930,10 +930,10 @@
<FileType>1</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<ColumnNumber>16</ColumnNumber>
<ColumnNumber>0</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>118</TopLine>
<CurrentLine>127</CurrentLine>
<TopLine>1</TopLine>
<CurrentLine>1</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\src\mouse_app.c</PathWithFileName>
<FilenameWithoutPath>mouse_app.c</FilenameWithoutPath>
@ -962,10 +962,10 @@
<FileType>1</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<ColumnNumber>12</ColumnNumber>
<ColumnNumber>0</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>140</TopLine>
<CurrentLine>152</CurrentLine>
<TopLine>1</TopLine>
<CurrentLine>1</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\src\msc_app.c</PathWithFileName>
<FilenameWithoutPath>msc_app.c</FilenameWithoutPath>
@ -1016,7 +1016,7 @@
<GroupNumber>2</GroupNumber>
<FileNumber>9</FileNumber>
<FileType>1</FileType>
<tvExp>1</tvExp>
<tvExp>0</tvExp>
<Focus>0</Focus>
<ColumnNumber>0</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
@ -1068,8 +1068,8 @@
<Focus>0</Focus>
<ColumnNumber>0</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>343</TopLine>
<CurrentLine>347</CurrentLine>
<TopLine>1</TopLine>
<CurrentLine>1</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\tinyusb\host\usbh.c</PathWithFileName>
<FilenameWithoutPath>usbh.c</FilenameWithoutPath>
@ -1338,10 +1338,10 @@
<FileType>1</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<ColumnNumber>29</ColumnNumber>
<ColumnNumber>0</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>602</TopLine>
<CurrentLine>606</CurrentLine>
<TopLine>1</TopLine>
<CurrentLine>1</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\tinyusb\host\ohci\ohci.c</PathWithFileName>
<FilenameWithoutPath>ohci.c</FilenameWithoutPath>
@ -1428,7 +1428,7 @@
<Focus>0</Focus>
<ColumnNumber>39</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>57</TopLine>
<TopLine>58</TopLine>
<CurrentLine>63</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\vendor\fatfs\diskio.c</PathWithFileName>
@ -1442,10 +1442,10 @@
<FileType>1</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<ColumnNumber>44</ColumnNumber>
<ColumnNumber>11</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>2098</TopLine>
<CurrentLine>2113</CurrentLine>
<TopLine>2114</TopLine>
<CurrentLine>2121</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\vendor\fatfs\ff.c</PathWithFileName>
<FilenameWithoutPath>ff.c</FilenameWithoutPath>
@ -1516,7 +1516,7 @@
<Focus>0</Focus>
<ColumnNumber>17</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>82</TopLine>
<TopLine>83</TopLine>
<CurrentLine>90</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\..\bsp\boards\printf_retarget.c</PathWithFileName>
@ -1652,7 +1652,7 @@
<Focus>0</Focus>
<ColumnNumber>13</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>169</TopLine>
<TopLine>170</TopLine>
<CurrentLine>174</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\..\bsp\lpc43xx\startup_keil\startup_LPC43xx.s</PathWithFileName>
@ -1868,7 +1868,7 @@
<Focus>0</Focus>
<ColumnNumber>0</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>139</TopLine>
<TopLine>140</TopLine>
<CurrentLine>145</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\..\bsp\lpc175x_6x\startup_keil\startup_LPC17xx.s</PathWithFileName>

View File

@ -1375,46 +1375,6 @@
<FileName>pca9532.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\bsp\boards\embedded_artists\oem_base_board\pca9532.c</FilePath>
<FileOption>
<CommonProperty>
<UseCPPCompiler>2</UseCPPCompiler>
<RVCTCodeConst>0</RVCTCodeConst>
<RVCTZI>0</RVCTZI>
<RVCTOtherData>0</RVCTOtherData>
<ModuleSelection>0</ModuleSelection>
<IncludeInBuild>0</IncludeInBuild>
<AlwaysBuild>2</AlwaysBuild>
<GenerateAssemblyFile>2</GenerateAssemblyFile>
<AssembleAssemblyFile>2</AssembleAssemblyFile>
<PublicsOnly>2</PublicsOnly>
<StopOnExitCode>11</StopOnExitCode>
<CustomArgument></CustomArgument>
<IncludeLibraryModules></IncludeLibraryModules>
</CommonProperty>
<FileArmAds>
<Cads>
<interw>2</interw>
<Optim>0</Optim>
<oTime>2</oTime>
<SplitLS>2</SplitLS>
<OneElfS>2</OneElfS>
<Strict>2</Strict>
<EnumInt>2</EnumInt>
<PlainCh>2</PlainCh>
<Ropi>2</Ropi>
<Rwpi>2</Rwpi>
<wLevel>0</wLevel>
<uThumb>2</uThumb>
<uSurpInc>2</uSurpInc>
<VariousControls>
<MiscControls></MiscControls>
<Define></Define>
<Undefine></Undefine>
<IncludePath></IncludePath>
</VariousControls>
</Cads>
</FileArmAds>
</FileOption>
</File>
<File>
<FileName>board_ngx4330.c</FileName>

View File

@ -1,62 +1,62 @@
/**************************************************************************/
/*!
@file primitive_types.h
@author hathach (tinyusb.org)
@section LICENSE
Software License Agreement (BSD License)
Copyright (c) 2013, hathach (tinyusb.org)
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holders nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This file is part of the tinyusb stack.
*/
/**************************************************************************/
/** \ingroup TBD
* \defgroup TBD
* \brief TBD
*
* @{
*/
#ifndef _TUSB_PRIMITIVE_TYPES_H_
#define _TUSB_PRIMITIVE_TYPES_H_
#ifdef __cplusplus
extern "C" {
#endif
#include <stdbool.h>
#include <stdint.h>
#ifdef __cplusplus
}
#endif
#endif /* _TUSB_PRIMITIVE_TYPES_H_ */
/** @} */
/**************************************************************************/
/*!
@file primitive_types.h
@author hathach (tinyusb.org)
@section LICENSE
Software License Agreement (BSD License)
Copyright (c) 2013, hathach (tinyusb.org)
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holders nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This file is part of the tinyusb stack.
*/
/**************************************************************************/
/** \ingroup TBD
* \defgroup TBD
* \brief TBD
*
* @{
*/
#ifndef _TUSB_PRIMITIVE_TYPES_H_
#define _TUSB_PRIMITIVE_TYPES_H_
#ifdef __cplusplus
extern "C" {
#endif
#include <stdbool.h>
#include <stdint.h>
#ifdef __cplusplus
}
#endif
#endif /* _TUSB_PRIMITIVE_TYPES_H_ */
/** @} */

View File

@ -6,7 +6,7 @@
into the USB RAM section as follows. if your mcu's usb controller has no such limit, define TUSB_CFG_ATTR_USBRAM as empty macro.
@code
uint8_t tinyusb_data[10] TUSB_CFG_ATTR_USBRAM;
TUSB_CFG_ATTR_USBRAM uint8_t tinyusb_data[10];
@endcode
*/
#define TUSB_CFG_ATTR_USBRAM