mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-08-15 00:29:02 +00:00
turn on thumb. untested.
make system still links in a lot of unnecessary stuff.
This commit is contained in:
parent
2136e0fe06
commit
f023a1a8f7
@ -26,7 +26,7 @@
|
|||||||
# clean the slate ...
|
# clean the slate ...
|
||||||
PLATFORM_LDFLAGS =
|
PLATFORM_LDFLAGS =
|
||||||
PLATFORM_RELFLAGS = -fno-strict-aliasing -fno-common -ffixed-r8 -msoft-float
|
PLATFORM_RELFLAGS = -fno-strict-aliasing -fno-common -ffixed-r8 -msoft-float
|
||||||
PLATFORM_CPPFLAGS = -march=armv4 -mtune=arm7tdmi -DCONFIG_ARM -D__ARM__
|
PLATFORM_CPPFLAGS = -march=armv4t -mthumb -mtune=arm7tdmi-s -mthumb-interwork -DCONFIG_ARM -D__ARM__
|
||||||
TEXT_BASE = 0x00400000
|
TEXT_BASE = 0x00400000
|
||||||
|
|
||||||
#########################################################################
|
#########################################################################
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
#define GPIO_DATA0 0x80000008
|
#define GPIO_DATA0 0x80000008
|
||||||
|
|
||||||
#include "embedded_types.h"
|
#include "embedded_types.h"
|
||||||
|
#include "nvm.h"
|
||||||
|
|
||||||
#define reg(x) (*(volatile uint32_t *)(x))
|
#define reg(x) (*(volatile uint32_t *)(x))
|
||||||
|
|
||||||
@ -30,6 +31,8 @@ const uint8_t hex[16]={'0','1','2','3','4','5','6','7',
|
|||||||
__attribute__ ((section ("startup")))
|
__attribute__ ((section ("startup")))
|
||||||
void main(void) {
|
void main(void) {
|
||||||
uint8_t c;
|
uint8_t c;
|
||||||
|
nvmType_t type;
|
||||||
|
nvmErr_t err;
|
||||||
|
|
||||||
*(volatile uint32_t *)GPIO_PAD_DIR0 = 0x00000100;
|
*(volatile uint32_t *)GPIO_PAD_DIR0 = 0x00000100;
|
||||||
|
|
||||||
@ -50,6 +53,16 @@ void main(void) {
|
|||||||
reg(UART1_CON) = 0x00000003; /* enable receive and transmit */
|
reg(UART1_CON) = 0x00000003; /* enable receive and transmit */
|
||||||
reg(GPIO_FUNC_SEL0) = ( (0x01 << (14*2)) | (0x01 << (15*2)) ); /* set GPIO15-14 to UART (UART1 TX and RX)*/
|
reg(GPIO_FUNC_SEL0) = ( (0x01 << (14*2)) | (0x01 << (15*2)) ); /* set GPIO15-14 to UART (UART1 TX and RX)*/
|
||||||
|
|
||||||
|
puts("Detecting internal nvm\n\r");
|
||||||
|
|
||||||
|
err = nvm_detect(gNvmInternalInterface_c, &type);
|
||||||
|
|
||||||
|
puts("nvm_detect returned: ");
|
||||||
|
putc(err);
|
||||||
|
puts(" type is: ");
|
||||||
|
putc(type);
|
||||||
|
puts("\n\r");
|
||||||
|
|
||||||
while(1) {
|
while(1) {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user