Skip to content

Commit b57f7d5

Browse files
committed
Merge pull request #1545 from TomoYamanaka/master
Support of export function to the IAR.
2 parents 82e77dc + 60b7acc commit b57f7d5

File tree

28 files changed

+6410
-27
lines changed

28 files changed

+6410
-27
lines changed

libraries/USBDevice/USBDevice/TARGET_RENESAS/TARGET_RZ_A1H/inc/devdrv_usb_function_api.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,8 @@ void usb1_function_Vendor4(uint16_t type, uint16_t req, uint16_t value, uint
334334
void usb1_function_Vendor5(uint16_t type, uint16_t req, uint16_t value, uint16_t index, uint16_t length);
335335
void usb1_function_ResetDescriptor(uint16_t mode);
336336

337-
uint16_t Userdef_USB_usb1_function_d0fifo_dmaintid(void);
338-
uint16_t Userdef_USB_usb1_function_d1fifo_dmaintid(void);
337+
IRQn_Type Userdef_USB_usb1_function_d0fifo_dmaintid(void);
338+
IRQn_Type Userdef_USB_usb1_function_d1fifo_dmaintid(void);
339339
void Userdef_USB_usb1_function_attach(void);
340340
void Userdef_USB_usb1_function_detach(void);
341341
void Userdef_USB_usb1_function_delay_1ms(void);

libraries/USBHost/USBHost/USBEndpoint.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ void USBEndpoint::queueTransfer()
140140

141141
//Now add this free TD at this end of the queue
142142
state = USB_TYPE_PROCESSING;
143-
td_current->nextTD = td_next;
143+
td_current->nextTD = (hcTd*)td_next;
144144
hced->tailTD = td_next;
145145
}
146146

@@ -158,5 +158,5 @@ void USBEndpoint::unqueueTransfer(volatile HCTD * td)
158158
void USBEndpoint::queueEndpoint(USBEndpoint * ed)
159159
{
160160
nextEp = ed;
161-
hced->nextED = (ed == NULL) ? 0 : ed->getHCED();
161+
hced->nextED = (ed == NULL) ? 0 : (hcEd*)(ed->getHCED());
162162
}

libraries/USBHost/USBHost/USBHost.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ void USBHost::transferCompleted(volatile uint32_t addr)
304304
do {
305305
volatile HCTD* td = (volatile HCTD*)addr;
306306
addr = (uint32_t)td->nextTD; //Dequeue from physical list
307-
td->nextTD = tdList; //Enqueue into reversed list
307+
td->nextTD = (hcTd*)tdList; //Enqueue into reversed list
308308
tdList = td;
309309
} while(addr);
310310

libraries/USBHost/USBHost/USBHostTypes.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,10 @@ enum ENDPOINT_TYPE {
136136
#define CONFIGURATION_DESCRIPTOR_LENGTH 0x09
137137

138138
// ------------ HostController Transfer Descriptor ------------
139-
typedef struct HCTD {
139+
typedef struct hcTd {
140140
__IO uint32_t control; // Transfer descriptor control
141141
__IO uint8_t * currBufPtr; // Physical address of current buffer pointer
142-
__IO HCTD * nextTD; // Physical pointer to next Transfer Descriptor
142+
__IO hcTd * nextTD; // Physical pointer to next Transfer Descriptor
143143
__IO uint8_t * bufEnd; // Physical address of end of buffer
144144
void * ep; // ep address where a td is linked in
145145
uint32_t dummy[3]; // padding
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
/*###ICF### Section handled by ICF editor, don't touch! ****/
2+
/*-Editor annotation file-*/
3+
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\a_v1_0.xml" */
4+
/*-Specials-*/
5+
define symbol __ICFEDIT_intvec_start__ = 0x18004000;
6+
/*-Memory Regions-*/
7+
define symbol __ICFEDIT_region_ROM_start__ = 0x18000000;
8+
define symbol __ICFEDIT_region_ROM_end__ = 0x187FFFFF;
9+
define symbol __ICFEDIT_region_TTB_start__ = 0x20000000;
10+
define symbol __ICFEDIT_region_TTB_end__ = 0x2001FFFF;
11+
define symbol __ICFEDIT_region_RAM_start__ = 0x20020000;
12+
define symbol __ICFEDIT_region_RAM_end__ = 0x209FFFFF;
13+
14+
/*-Sizes-*/
15+
define symbol __ICFEDIT_size_cstack__ = 0x00004000;
16+
define symbol __ICFEDIT_size_svcstack__ = 0x00008000;
17+
define symbol __ICFEDIT_size_irqstack__ = 0x00008000;
18+
define symbol __ICFEDIT_size_fiqstack__ = 0x00000100;
19+
define symbol __ICFEDIT_size_undstack__ = 0x00000100;
20+
define symbol __ICFEDIT_size_abtstack__ = 0x00000100;
21+
define symbol __ICFEDIT_size_heap__ = 0x00080000;
22+
/**** End of ICF editor section. ###ICF###*/
23+
24+
define symbol __ICFEDIT_region_RetRAM_start__ = 0x20000000;
25+
define symbol __ICFEDIT_region_RetRAM_end__ = 0x2001FFFF;
26+
27+
define symbol __ICFEDIT_region_MirrorRAM_start__ = 0x60900000;
28+
define symbol __ICFEDIT_region_MirrorRAM_end__ = 0x609FFFFF;
29+
30+
define symbol __ICFEDIT_region_MirrorRetRAM_start__ = 0x60000000;
31+
define symbol __ICFEDIT_region_MirrorRetRAM_end__ = 0x6001FFFF;
32+
33+
define memory mem with size = 4G;
34+
35+
define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
36+
define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
37+
define region RetRAM_region = mem:[from __ICFEDIT_region_RetRAM_start__ to __ICFEDIT_region_RetRAM_end__];
38+
define region MirrorRAM_region = mem:[from __ICFEDIT_region_MirrorRAM_start__ to __ICFEDIT_region_MirrorRAM_end__];
39+
define region MirrorRetRAM_region = mem:[from __ICFEDIT_region_MirrorRetRAM_start__ to __ICFEDIT_region_MirrorRetRAM_end__];
40+
41+
define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
42+
define block SVC_STACK with alignment = 8, size = __ICFEDIT_size_svcstack__ { };
43+
define block IRQ_STACK with alignment = 8, size = __ICFEDIT_size_irqstack__ { };
44+
define block FIQ_STACK with alignment = 8, size = __ICFEDIT_size_fiqstack__ { };
45+
define block UND_STACK with alignment = 8, size = __ICFEDIT_size_undstack__ { };
46+
define block ABT_STACK with alignment = 8, size = __ICFEDIT_size_abtstack__ { };
47+
define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
48+
49+
initialize by copy { readwrite };
50+
do not initialize { section .noinit };
51+
do not initialize { section MMU_TT };
52+
53+
place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
54+
55+
place in ROM_region { readonly };
56+
place in RAM_region { readwrite,
57+
block CSTACK, block SVC_STACK, block IRQ_STACK, block FIQ_STACK,
58+
block UND_STACK, block ABT_STACK, block HEAP };
59+
60+
place in RetRAM_region { section .retram };
61+
place in MirrorRAM_region { section .mirrorram };
62+
place in MirrorRetRAM_region { section .mirrorretram };

0 commit comments

Comments
 (0)