Skip to content

LPC1114 Port Pull Request #17

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

Merged
merged 71 commits into from
Aug 2, 2013
Merged
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
18c291b
Added ytsuboi's modifications for using the 1114
matthewelse Jul 19, 2013
cf1427e
Changed to use newer fork of mbed sdk
matthewelse Jul 19, 2013
a9bb4aa
Lots of changes, fixing build bugs and renaming
matthewelse Jul 19, 2013
e077c9a
Got rid of note in README.md that isn't needed
matthewelse Jul 19, 2013
0405198
Added UART to testing.
matthewelse Jul 19, 2013
6bfb704
Added output.txt to .gitignore
matthewelse Jul 19, 2013
da602b4
Revert "Added output.txt to .gitignore"
matthewelse Jul 19, 2013
e930637
Revert "Revert "Added output.txt to .gitignore""
matthewelse Jul 19, 2013
c703096
Clicked the wrong button, and had to revert.
matthewelse Jul 19, 2013
66ca1c9
Refactored bits of gpio_api.c
matthewelse Jul 19, 2013
7af2b9a
Updated .gitignore to ignore my uVision Project
matthewelse Jul 19, 2013
9097bf7
A bit more debugging
matthewelse Jul 19, 2013
84a76cd
Added a load of debug lines
matthewelse Jul 19, 2013
796bbbe
Fixed ARM/uARM build and compile error in DigitalOut.h
toyowata Jul 20, 2013
d15647e
[LPC1114]: add support for RTOS
ytsuboi Jul 20, 2013
f4757b3
Delete output.txt
ytsuboi Jul 21, 2013
794ab9c
Fixed #9 and test ticker test code
toyowata Jul 21, 2013
74741c6
Merge branch 'master' of https://github.com/matthewelse/mbed
toyowata Jul 21, 2013
8bd3171
Fixed ticker test case to support LPC1114
toyowata Jul 21, 2013
b4de450
Fixed uARM build
toyowata Jul 22, 2013
ca31bda
Removed printf debug lines
ytsuboi Jul 22, 2013
b172cd8
More fix for uARM build to avoid link error
toyowata Jul 22, 2013
1781d58
Merge branch 'master' of https://github.com/matthewelse/mbed
toyowata Jul 22, 2013
1097af7
Added DIP package pins to PinNames.h
matthewelse Jul 22, 2013
2a98955
Fixed gpio_api
toyowata Jul 22, 2013
1ace9f1
Added Sublime Text project files to .gitignore
matthewelse Jul 22, 2013
4cf6f09
Enabled the interrupts api to compile
matthewelse Jul 22, 2013
1da8e8a
Started to implement gpio_irq_set
matthewelse Jul 22, 2013
fea818f
Updates to interrupt handling
matthewelse Jul 22, 2013
1f01827
Changed .git-ignore to cover all sublime-text files
matthewelse Jul 23, 2013
04a368c
Merge remote-tracking branch 'upstream/master'
matthewelse Jul 23, 2013
8011992
Fully implemented gpio_irq_set
matthewelse Jul 23, 2013
819ca55
Removed extraneous comment from the function
matthewelse Jul 23, 2013
c56d1a5
Fully implemented GPIO_IRQ
matthewelse Jul 23, 2013
55f91f1
Fixed errors in gpio_irq_api.c
matthewelse Jul 23, 2013
17678d2
Merge remote-tracking branch 'origin/gpiointerrupts'
matthewelse Jul 23, 2013
d67d4f7
Create README.md
matthewelse Jul 23, 2013
9f47511
Made some mbed tests compatible with the LPC1114
matthewelse Jul 23, 2013
a125a25
Implemented PortIn, PortOut and PortInOut API #8
toyowata Jul 24, 2013
3d08be9
Attempt to fix the interrupts problem.
matthewelse Jul 24, 2013
5b74924
Added .bak files to .gitignore
matthewelse Jul 24, 2013
57cbd39
Merge remote-tracking branch 'upstream/master'
matthewelse Jul 24, 2013
df067bd
Complete support for GPIO interrupts.
matthewelse Jul 24, 2013
11d9468
Update main.cpp
matthewelse Jul 24, 2013
4bce371
Fixed InterruptIn (MBED_A7) Test
matthewelse Jul 24, 2013
b47b2fc
Added debug.log to .gitignore
matthewelse Jul 24, 2013
ddf19e9
Merge remote-tracking branch 'upstream/master'
ytsuboi Jul 25, 2013
a7ba276
Fixed bug in gpio_irq_api
matthewelse Jul 25, 2013
c3ebd47
Tidying up gpio_irq_api.c
matthewelse Jul 25, 2013
66dddfb
Add support for the LPC1114 in export.
matthewelse Jul 25, 2013
a356553
Fixed incorrect use of static in port_api.c
matthewelse Jul 25, 2013
1b399ec
Added new test for devices with no analog out.
matthewelse Jul 25, 2013
ddbb67a
Merge remote-tracking branch 'upstream/master'
matthewelse Jul 26, 2013
3172fd9
Fix both edge bug in gpio_irq_api.c
matthewelse Jul 26, 2013
698001c
Fixed issue #13
toyowata Jul 26, 2013
153153f
Added serial_break_clear/serial_break_set
matthewelse Jul 26, 2013
3b71d6d
Update README.md
matthewelse Jul 26, 2013
8c2ede6
Merge remote-tracking branch 'upstream/master'
matthewelse Jul 26, 2013
a9f0d9a
[LPC1114]: uARM fixed
ytsuboi Jul 26, 2013
dc68b76
Added timeout for i2c_stop in LPC1114 target.
matthewelse Aug 1, 2013
df5c36a
Uncommented i2c_wait_SI(obj), as it should not have been commented out.
matthewelse Aug 1, 2013
0f7ece0
Fixed I2C API
matthewelse Aug 1, 2013
3708732
Reverted the change to ARM.py from dc68b76
matthewelse Aug 1, 2013
789f81b
Removed extra core_* files that are no longer needed. Makes Emilio mo…
matthewelse Aug 1, 2013
7f736b9
Removed unnecessary LPC1114-specific test.
matthewelse Aug 1, 2013
7c2658b
Reverted unnecessary change to settings.py
matthewelse Aug 1, 2013
c01e03c
Tidied up one line of targets.py
matthewelse Aug 1, 2013
34e9983
Addition of a newline to the end of gitignore
matthewelse Aug 1, 2013
fa19362
Removed non-functional LPC1347 uVision export support, and added LPC1…
matthewelse Aug 2, 2013
65765b6
Merge branch 'forpullrequest' of https://github.com/matthewelse/mbed …
matthewelse Aug 2, 2013
7827d62
Added alternative DIP package names for pins in the LPC1114
matthewelse Aug 2, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -36,3 +36,12 @@ nosetests.xml
.mr.developer.cfg
.project
.pydevproject

output.txt
uVision Project/

# Sublime Text Project Files
*.sublime*

*.bak
debug.log
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -28,6 +28,7 @@ NXP:
* LPC4088 (Cortex-M4)
* LPC4330 (Cortex-M4 + Cortex-M0)
* LPC1347 (Cortex-M3)
* LPC1114 (Cortex-M0)

Freescale:
* [KL25Z](http://mbed.org/handbook/mbed-FRDM-KL25Z) (Cortex-M0+)
602 changes: 602 additions & 0 deletions libraries/mbed/targets/cmsis/TARGET_NXP/TARGET_LPC11XX/LPC11xx.h

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

LR_IROM1 0x00000000 0x8000 { ; load region size_region (32k)
ER_IROM1 0x00000000 0x8000 { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
}
; 8_byte_aligned(48 vect * 4 bytes) = 8_byte_aligned(0xC0) = 0xC0
; 8KB - 0xC0 = 0xF40
RW_IRAM1 0x100000C0 0xF40 {
.ANY (+RW +ZI)
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,303 @@
;/*****************************************************************************
; * @file: startup_LPC11xx.s
; * @purpose: CMSIS Cortex-M0 Core Device Startup File
; * for the NXP LPC11xx Device Series
; * @version: V1.0
; * @date: 25. Nov. 2008
; *------- <<< Use Configuration Wizard in Context Menu >>> ------------------
; *
; * Copyright (C) 2008 ARM Limited. All rights reserved.
; * ARM Limited (ARM) is supplying this software for use with Cortex-M0
; * processor based microcontrollers. This file can be freely distributed
; * within development tools that are supporting such ARM based processors.
; *
; * THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
; * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
; * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
; * ARM SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR
; * CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
; *
; *****************************************************************************/

Stack_Size EQU 0x00000400

AREA STACK, NOINIT, READWRITE, ALIGN=3
EXPORT __initial_sp

Stack_Mem SPACE Stack_Size
__initial_sp EQU 0x10001000 ; Top of RAM from LPC1114


Heap_Size EQU 0x00000000

AREA HEAP, NOINIT, READWRITE, ALIGN=3
EXPORT __heap_base
EXPORT __heap_limit

__heap_base
Heap_Mem SPACE Heap_Size
__heap_limit

PRESERVE8
THUMB

; Vector Table Mapped to Address 0 at Reset

AREA RESET, DATA, READONLY
EXPORT __Vectors

__Vectors DCD __initial_sp ; Top of Stack
DCD Reset_Handler ; Reset Handler
DCD NMI_Handler ; NMI Handler
DCD HardFault_Handler ; Hard Fault Handler
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD SVC_Handler ; SVCall Handler
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD PendSV_Handler ; PendSV Handler
DCD SysTick_Handler ; SysTick Handler

DCD FLEX_INT0_IRQHandler ; All GPIO pin can be routed to FLEX_INTx
DCD FLEX_INT1_IRQHandler ;
DCD FLEX_INT2_IRQHandler ;
DCD FLEX_INT3_IRQHandler ;
DCD FLEX_INT4_IRQHandler ;
DCD FLEX_INT5_IRQHandler ;
DCD FLEX_INT6_IRQHandler ;
DCD FLEX_INT7_IRQHandler ;
DCD GINT0_IRQHandler ;
DCD GINT1_IRQHandler ; PIO0 (0:7)
DCD Reserved_IRQHandler ; Reserved
DCD Reserved_IRQHandler ;
DCD Reserved_IRQHandler ;
DCD Reserved_IRQHandler ;
DCD SSP1_IRQHandler ; SSP1
DCD I2C_IRQHandler ; I2C
DCD TIMER16_0_IRQHandler ; 16-bit Timer0
DCD TIMER16_1_IRQHandler ; 16-bit Timer1
DCD TIMER32_0_IRQHandler ; 32-bit Timer0
DCD TIMER32_1_IRQHandler ; 32-bit Timer1
DCD SSP0_IRQHandler ; SSP0
DCD UART_IRQHandler ; UART
DCD USB_IRQHandler ; USB IRQ
DCD USB_FIQHandler ; USB FIQ
DCD ADC_IRQHandler ; A/D Converter
DCD WDT_IRQHandler ; Watchdog timer
DCD BOD_IRQHandler ; Brown Out Detect
DCD FMC_IRQHandler ; IP2111 Flash Memory Controller
DCD Reserved_IRQHandler ; Reserved
DCD Reserved_IRQHandler ; Reserved
DCD Reserved_IRQHandler ; Reserved
DCD Reserved_IRQHandler ; Reserved

;; 48 vector entries. We pad to 128 to fill the 0x0 - 0x1FF REMAP address space

DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill

DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill

DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill

DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill

DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill

DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill

DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill

DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill
DCD 0xFFFFFFFF ; Datafill

IF :LNOT::DEF:NO_CRP
AREA |.ARM.__at_0x02FC|, CODE, READONLY
CRP_Key DCD 0xFFFFFFFF
ENDIF


AREA |.text|, CODE, READONLY



; Reset Handler

Reset_Handler PROC
EXPORT Reset_Handler [WEAK]
IMPORT SystemInit
IMPORT __main
LDR R0, =SystemInit
BLX R0
LDR R0, =__main
BX R0
ENDP

; Dummy Exception Handlers (infinite loops which can be modified)

; now, under COMMON NMI.c and NMI.h, a real NMI handler is created if NMI is enabled
; for particular peripheral.
;NMI_Handler PROC
; EXPORT NMI_Handler [WEAK]
; B .
; ENDP
HardFault_Handler\
PROC
EXPORT HardFault_Handler [WEAK]
B .
ENDP
SVC_Handler PROC
EXPORT SVC_Handler [WEAK]
B .
ENDP
PendSV_Handler PROC
EXPORT PendSV_Handler [WEAK]
B .
ENDP
SysTick_Handler PROC
EXPORT SysTick_Handler [WEAK]
B .
ENDP
Reserved_IRQHandler PROC
EXPORT Reserved_IRQHandler [WEAK]
B .
ENDP

Default_Handler PROC
; for LPC11Uxx (With USB)
EXPORT NMI_Handler [WEAK]
EXPORT FLEX_INT0_IRQHandler [WEAK]
EXPORT FLEX_INT1_IRQHandler [WEAK]
EXPORT FLEX_INT2_IRQHandler [WEAK]
EXPORT FLEX_INT3_IRQHandler [WEAK]
EXPORT FLEX_INT4_IRQHandler [WEAK]
EXPORT FLEX_INT5_IRQHandler [WEAK]
EXPORT FLEX_INT6_IRQHandler [WEAK]
EXPORT FLEX_INT7_IRQHandler [WEAK]
EXPORT GINT0_IRQHandler [WEAK]
EXPORT GINT1_IRQHandler [WEAK]
EXPORT SSP1_IRQHandler [WEAK]
EXPORT I2C_IRQHandler [WEAK]
EXPORT TIMER16_0_IRQHandler [WEAK]
EXPORT TIMER16_1_IRQHandler [WEAK]
EXPORT TIMER32_0_IRQHandler [WEAK]
EXPORT TIMER32_1_IRQHandler [WEAK]
EXPORT SSP0_IRQHandler [WEAK]
EXPORT UART_IRQHandler [WEAK]

EXPORT USB_IRQHandler [WEAK]
EXPORT USB_FIQHandler [WEAK]
EXPORT ADC_IRQHandler [WEAK]
EXPORT WDT_IRQHandler [WEAK]
EXPORT BOD_IRQHandler [WEAK]
EXPORT FMC_IRQHandler [WEAK]
EXPORT USBWakeup_IRQHandler [WEAK]

NMI_Handler
FLEX_INT0_IRQHandler
FLEX_INT1_IRQHandler
FLEX_INT2_IRQHandler
FLEX_INT3_IRQHandler
FLEX_INT4_IRQHandler
FLEX_INT5_IRQHandler
FLEX_INT6_IRQHandler
FLEX_INT7_IRQHandler
GINT0_IRQHandler
GINT1_IRQHandler
SSP1_IRQHandler
I2C_IRQHandler
TIMER16_0_IRQHandler
TIMER16_1_IRQHandler
TIMER32_0_IRQHandler
TIMER32_1_IRQHandler
SSP0_IRQHandler
UART_IRQHandler
USB_IRQHandler
USB_FIQHandler
ADC_IRQHandler
WDT_IRQHandler
BOD_IRQHandler
FMC_IRQHandler
USBWakeup_IRQHandler

B .

ENDP

ALIGN
END
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/* mbed Microcontroller Library - stackheap
* Copyright (C) 2009-2011 ARM Limited. All rights reserved.
*
* Setup a fixed single stack/heap memory model,
* between the top of the RW/ZI region and the stackpointer
*/

#ifdef __cplusplus
extern "C" {
#endif

#include <rt_misc.h>
#include <stdint.h>

extern char Image$$RW_IRAM1$$ZI$$Limit[];

extern __value_in_regs struct __initial_stackheap __user_setup_stackheap(uint32_t R0, uint32_t R1, uint32_t R2, uint32_t R3) {
uint32_t zi_limit = (uint32_t)Image$$RW_IRAM1$$ZI$$Limit;
uint32_t sp_limit = __current_sp();

zi_limit = (zi_limit + 7) & ~0x7; // ensure zi_limit is 8-byte aligned

struct __initial_stackheap r;
r.heap_base = zi_limit;
r.heap_limit = sp_limit;
return r;
}

#ifdef __cplusplus
}
#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

LR_IROM1 0x00000000 0x8000 { ; load region size_region (32k)
ER_IROM1 0x00000000 0x8000 { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
}
; 8_byte_aligned(48 vect * 4 bytes) = 8_byte_aligned(0xC0) = 0xC0
; 8KB - 0xC0 = 0xF40
RW_IRAM1 0x100000C0 0xF40 {
.ANY (+RW +ZI)
}
}

Loading