turn on thumb. untested.

make system still links in a lot of unnecessary stuff.
This commit is contained in:
Mariano Alvira 2009-04-15 11:58:29 -04:00
parent 2136e0fe06
commit f023a1a8f7
2 changed files with 14 additions and 1 deletions

View file

@ -26,7 +26,7 @@
# clean the slate ...
PLATFORM_LDFLAGS =
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
#########################################################################

View file

@ -13,6 +13,7 @@
#define GPIO_DATA0 0x80000008
#include "embedded_types.h"
#include "nvm.h"
#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")))
void main(void) {
uint8_t c;
nvmType_t type;
nvmErr_t err;
*(volatile uint32_t *)GPIO_PAD_DIR0 = 0x00000100;
@ -50,6 +53,16 @@ void main(void) {
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)*/
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) {
};
}