PDA

View Full Version : more on lpc2000 trouble


x-ray
04-08-07, 12:33 PM
downloads fine:

:1000000040F09FE514F09FE514F09FE514F09FE5A4
:1000100014F09FE50000A0E110F01FE50CF09FE553
:1000200034000000380000003C00000040000000E8
:1000300044000000FEFFFFEAFEFFFFEAFEFFFFEACA
:0C004000FEFFFFEAFEFFFFEAB80400002C
:10004C000DC0A0E1F0DF2DE904B04CE214D04DE27C
:10005C000E52A0E30A6985E2184096E50E82A0E3F1
:10006C007F5988E20235A0E30626A0E32510A0E321
:10007C000E7684E3187086E5143086E51C2086E540
:10008C008410C5E5640000EB0100A0E38000C5E529
:10009C00610000EB0590A0E1B8A8D9E1010B1AE3CF
:1000AC00FCFFFF0A0360A0E38060C9E55A0000EB87
:1000BC001288A0E3D12D88E20EE2A0E37FC98EE284
:1000CC0016E082E20922A0E3C239A0E12C300BE554
:1000DC002233A0E3C329A0E130200BE50329A0E3E0
:1000EC008E3282E234300BE50E32A0E3032983E238
:1000FC0038200BE50329A0E30259A0E34E3282E23B
:10010C004E42A0E30220A0E33C300BE50560A0E1E9
:10011C000020C9E50570A0E10E12A0E30309A0E3DD
:10012C0001CC8CE20430A0E30120A0E37F4984E2FF
:10013C000030C4E501A0A0E10020CCE5051081E071
:10014C000080A0E10330A0E30000A0E3FF2EE0E379
:10015C004E5285E28E6286E2CE7287E2000085E521
:10016C00FECEE0E3000086E5000087E5100081E5A7
:10017C0018E081E5143081E5030002E52000A0E3DE
:10018C000F000CE530004BE2030090E850209FE597
:10019C002530A0E3003081E5002080E534001BE52C
:1001AC00CE8288E205C0A0E30710A0E30BA98AE287
:1001BC007C30E0E300C08AE50010C0E50030C8E503
:1001CC0038C01BE57820E0E30020CCE53C001BE5C3
:1001DC000110A0E303C0A0E30010C0E500C0C8E517
:1001EC00F0AF1BE9F40100000F002DE90E22A0E393
:1001FC00020982E20A1982E20123A0E3142081E5BC
:10020C000120A0E3002080E5FF10A0E33F0DE0E318
:10021C000F1000E50F00BDE804F05EE20EC2A0E393
:10022C007F098CE25510E0E35520A0E38C10C0E56B
:10023C008C20C0E50EF0A0E10E12A0E3030981E2D0
:10024C001410D0E5010001E20EF0A0E10E12A0E3C3
:10025C00030981E21410D0E5200001E20EF0A0E1C8
:10026C00FFC000E20E32A0E3032983E231104CE21E
:10027C0000C0C2E5050051E301F19F970A0000EAB6
:10028C00A4020000BC020000D0020000E00200004A
:10029C00F0020000000300000E02A0E30A3980E225
:1002AC000225A0E3142083E50EF0A0E10EF0A0E1FE
:1002BC000E12A0E30A3981E20225A0E31C2083E59B
:1002CC000EF0A0E10E22A0E30A3982E20125A0E3A0
:1002DC00F3FFFFEA0EC2A0E30A398CE20125A0E38A
:1002EC00F5FFFFEA0E02A0E30A3980E20226A0E342
:1002FC00EBFFFFEA0E22A0E30A1982E202C6A0E39A
:10030C001CC081E5E8FFFFEA0E12A0E3030981E2BD
:10031C000010D0E5FF0001E20EF0A0E10010D0E5E6
:10032C00000051E370402DE90120A0E17080BD0870
:10033C000E42A0E30AE984E203C984E20265A0E369
:10034C000155A0E30246A0E31430DCE5FF2002E2F5
:10035C00200013E3313042E20C00000A0020CCE50F
:10036C00010080E2050053E303F19F97060000EAC9
:10037C0094030000AC030000B4030000BC030000B5
:10038C00C4030000CC03000014608EE50010D0E51F
:10039C00000051E30120A0E1EAFFFF1A7080BDE8E4
:1003AC001C608EE5F8FFFFEA14508EE5F6FFFFEABD
:1003BC001C508EE5F4FFFFEA14408EE5F2FFFFEAD5
:1003CC001C408EE5F0FFFFEA0DC0A0E110D82DE92E
:1003DC0004B04CE219FFFFEB94009FE5CEFFFFEB5E
:1003EC000E22A0E30A0982E2031982E20245A0E38D
:1003FC0001E5A0E302C6A0E31420D1E5010012E35D
:10040C00FCFFFF0A1420D1E5200012E3F9FFFF0ADC
:10041C000020D1E5FF3002E2312043E20030C1E59B
:10042C00050052E302F19F97F2FFFFEA500400002F
:10043C005804000060040000680400007004000010
:10044C0078040000144080E5EAFFFFEA1C4080E5D8
:10045C00E8FFFFEA14E080E5E6FFFFEA1CE080E538
:10046C00E4FFFFEA14C080E5E2FFFFEA1CC080E570
:10047C00E0FFFFEA840400000A0D54657374204504
:10048C0063686F2028312D36204C454473204F6E05
:10049C002F4F6666290A0D00004743433A20284730
:0A04AC004E552920332E332E310067
:1004B8000D00A0E1FA0F40E2FA1F40E212F021E33A
:1004C80000D0A0E111F021E301D0A0E113F021E375
:0C04D80000E09FE50EF0A0E1D40300005E
:040000030000004CAD
:00000001FF




Code in HEX file exceeds Flash Limitations!
:1000000040F09FE514F09FE514F09FE514F09FE5A4
:1000100014F09FE50000A0E110F01FE50CF09FE553
:1000200034000000380000003C00000040000000E8
:1000300044000000FEFFFFEAFEFFFFEAFEFFFFEACA
:0C004000FEFFFFEAFEFFFFEA30030000B5
:10004C00002180E0021182E00101A0E1000050E3F8
:10005C000EF0A0D1010040E2000050E3FCFFFFCA0B
:10006C000EF0A0E120009FE50E22A0E3091982E228
:10007C0014C091E5003090E50C0053E114C09115CB
:10008C0000C08015F7FFFF0A0EF0A0E10000004051
:10009C000E32A0E30AC983E20127A0E31C208CE501
:1000AC000008A0E10238A0E30128A0E31C308CE595
:1000BC001C208CE514008CE50EF0A0E1F0472DE936
:1000CC000E42A0E30A7984E2181097E50EA2A0E391
:1000DC007F498AE20F9881E35560E0E35550A0E335
:1000EC000287A0E30638A0E32520A0E30100A0E3EB
:1000FC00189087E5148087E51C3087E58420C4E5DB
:10010C008C60C4E58C50C4E58000C4E58C60C4E50B
:10011C008C50C4E50490A0E1B8C8D9E1010B1CE3F4
:10012C00FCFFFF0A0269A0E30E12A0E31208A0E391
:10013C000EA2A0E37F5981E2D18D80E28E32A0E342
:10014C0006008AE05520E0E303A0A0E380A0C9E507
:10015C0016E088E28C20C9E50670A0E101CC85E2AE
:10016C000A8983E24E5286E20220A0E3036086E015
:10017C004E42A0E35530A0E38C30C9E50010A0E35B
:10018C000020C9E57F4984E20120A0E30430A0E30C
:10019C000030C4E5CE7287E20020CCE5001085E586
:1001AC00FE5AA0E3001086E5001087E5101080E5EC
:1001BC0018E080E514A080E50EE2A0E3005088E58D
:1001CC000A298EE20107A0E30218A0E31C0082E5D5
:1001DC00141082E56430A0E3013043E2000053E3E5
:1001EC00140082D51C1082D5FAFFFFCAF6FFFFEA75
:1001FC00F0472DE90E42A0E30A7984E2181097E546
:10020C000EA2A0E37F498AE20F9881E35560E0E3F8
:10021C005550A0E30287A0E30638A0E32520A0E315
:10022C000100A0E3189087E5148087E51C3087E572
:10023C008420C4E58C60C4E58C50C4E58000C4E522
:10024C008C60C4E58C50C4E50490A0E1B8C8D9E139
:10025C00010B1CE3FCFFFF0A0269A0E30EE2A0E322
:10026C001218A0E30EA2A0E306008AE07F598EE2EA
:10027C00D18D81E28E32A0E303A0A0E35520E0E310
:10028C0080A0C9E50670A0E18C20C9E501CC85E20F
:10029C0016E088E24E5286E20A8983E2036086E029
:1002AC000220A0E35530A0E34E42A0E38C30C9E518
:1002BC000010A0E30020C9E57F4984E2CE7287E2FA
:1002CC000430A0E30120A0E30030C4E50020CCE51D
:1002DC00001085E5001086E5001087E5101080E51C
:1002EC0018E080E514A080E5FE0AA0E3000088E594
:1002FC00F087BDE80EC2A0E37F098CE25510E0E365
:10030C005520A0E38C10C0E58C20C0E50EF0A0E1D8
:10031C00004743433A2028474E552920332E332E8D
:02032C0031009E
:100330000D00A0E1FA0F40E2FA1F40E212F021E3C3
:1003400000D0A0E111F021E301D0A0E113F021E3FE
:0C03500000E09FE50EF0A0E1C8000000F6
:020000044000BA
:0400000000000000FC
:040000030000004CAD
:00000001FF

Dave
04-09-07, 01:35 PM
I get the same error you are seeing, on the Philips Flash Utility V2.2.3, however the Flash Utility claims the second file loads even with the error. Does it run?

Does your development environment have any checking for incorrect memory addresses?

nmitech
04-09-07, 04:48 PM
Let's take a closer look at the bad hex file with two highlite lines below . Blue color indicate address filed, red for record type, green for data. You see the very first line and the third to the last sharing the same address and record type. This is the problem i believed when it tried to write data to the previous spot in the flash memory which will not allow prior to erase. I would remove the third line to the last, and try to load again see if it take it.

Code in HEX file exceeds Flash Limitations!
:1000000040F09FE514F09FE514F09FE514F09FE5A4
:1000100014F09FE50000A0E110F01FE50CF09FE553
:1000200034000000380000003C00000040000000E8
...
...
...
:020000044000BA
:0400000000000000FC
:040000030000004CAD
:00000001FF

x-ray
04-12-07, 05:11 PM
I get the same error you are seeing, on the Philips Flash Utility V2.2.3, however the Flash Utility claims the second file loads even with the error. Does it run?

it actually does run. at the time i didn't think it would but i found a bug in my firmware.

Does your development environment have any checking for incorrect memory addresses?

incorrect how?

x-ray
04-12-07, 05:18 PM
thank you both for your replies & explanations! i appreciate the refresher on intel hex format...it's been a long time since i used that stuff but i think you're on to something. i don't have the source here but i bet it came back as soon as a set up a global variable...resulting in me getting a code segment or something along that line. probably some code seg config is required. will advise.

x-ray
04-13-07, 10:51 PM
Let's take a closer look at the bad hex file with two highlite lines below . Blue color indicate address filed, red for record type, green for data. You see the very first line and the third to the last sharing the same address and record type. This is the problem i believed when it tried to write data to the previous spot in the flash memory which will not allow prior to erase. I would remove the third line to the last, and try to load again see if it take it.

i guess i'm in "Make File hell" even though i left them as in the example. i'm using the suggested gnude.


makefile:

# for making arm code Rob Chapman Apr 1, 04

NAME = test io

CC = arm-elf-gcc
LD = arm-elf-ld -v
AR = arm-elf-ar
AS = arm-elf-as
CP = arm-elf-objcopy

.SUFFIXES : .o .c .s

CFLAGS = -I./ -c -O3
AFLAGS = -ahls -mapcs-32
CAFLAGS = $(CFLAGS) -Wa,-ahls,-mapcs-32
LFLAGS = -Map main.map -nostartfiles -T simple.cmd
CPFLAGS = -O ihex

all: test

clean: -rm -f *.o *.a *.hex *.out *.map

test: main.out
@ echo "...copying"
$(CP) $(CPFLAGS) main.out main.hex

main.out: start.o ivt.o main.o simple.cmd
@ echo "..linking"
$(LD) $(LFLAGS) -o main.out start.o ivt.o main.o libc.a

.c.o:
@ echo ".compiling"
@ $(CC) $(CAFLAGS) $< > a.lst

mainin: start.s ivt.s main.c
@ echo ".compiling"
$(CC) $(CFLAGS) start.s ivt.s main.c


simple.cmd:

/* Simple command script for organizing memory Rob Chapman Apr 1, 04 */

SECTIONS
{
/* interrupt vectors */
. = 0x0; /* start of flash */
.interp :
{
*(.interp)
}

/* code and constants */
.text :
{
*(.text)
*(.strings)
*(.rodata.*)
*(.init)
*(.comment)
}

/* uninitialized data */
. = 0x40000000; /* start of ram */
.bss :
{
*(.bss)
*(COMMON)
*(.data)
}
}


interesting: this problem seems to have been triggered by defining a global variable. (i use them only with restraint.)

i fooled with the simple.cmd file until it worked. do you have any resources for more "enlightened" ways to edit these files. i merely guessed...dangerous.

/* Simple command script for organizing memory Rob Chapman Apr 1, 04 */

SECTIONS
{
/* interrupt vectors */
. = 0x0; /* start of flash */
.interp :
{
*(.interp)
}

/* code and constants */
.text :
{
*(.text)
*(.strings)
*(.rodata.*)
*(.init)
*(.comment)
}

/* uninitialized data */
. = 0x40000000; /* start of ram */
.bss :
{
*(COMMON)
*(.data)
}
}


thank you for your help!

mp