Guten Tag,
ich will das UART Beispiel von Hitex compelieren.
Und bekomme folgende Fehlermeldung:
test.sct(7): error: L6236E: No section matches selector - no section to
be FIRST/LAST.
Was hat diese zu bedeuten bzw. wie kann ich das Problem beheben?
Ich kann doch das ganze in Simulator laufen lassen?
Vielen Dank im Voraus.
1 | ; *************************************************************
|
2 | ; *** Scatter-Loading Description File generated by uVision ***
|
3 | ; *************************************************************
|
4 |
|
5 | LR_IROM1 0x00000000 { ; load region
|
6 | ER_IROM1 0x00000000 0x00020000 { ; load address = execution address
|
7 | *.o (RESET, +First)
|
8 | *(InRoot$$Sections)
|
9 | .ANY (+RO)
|
10 | }
|
11 | RW_IRAM1 0x40000000 0x00004000 { ; RW data
|
12 | .ANY (+RW +ZI)
|
13 | }
|
14 | }
|
1 | /*************************************************************/
|
2 | /* PROJECT NAME: UART */
|
3 | /* Project: LPC2100 Training course */
|
4 | /* Engineer: T Martin tmartin@hitex.co.uk */
|
5 | /* Filename: main.c */
|
6 | /* Language: C */
|
7 | /* Compiler: Keil ARM V2.00b */
|
8 | /* Assembler: */
|
9 | /* */
|
10 | /************************************************************/
|
11 | /* COPYRIGHT: Hitex UK Ltd 2005 */
|
12 | /* LICENSE: THIS VERSION CREATED FOR FREE DISTRIBUTION */
|
13 | /************************************************************/
|
14 | /* Function: */
|
15 | /* */
|
16 | /* Example */
|
17 | /* */
|
18 | /* Demonstrates RS232 Comms */
|
19 | /* */
|
20 | /* Oscillator frequency 12.000 Mhz */
|
21 | /* Target board Keil MCB2100 */
|
22 | /************************************************************/
|
23 |
|
24 |
|
25 | #define CR 0x0D
|
26 | #include <LPC21xx.H>
|
27 |
|
28 | void init_serial (void);
|
29 | int putchar (int ch);
|
30 | int getchar (void);
|
31 |
|
32 |
|
33 | unsigned char test;
|
34 |
|
35 | int main(void)
|
36 | {
|
37 | VPBDIV = 0x02; //Divide Pclk by two
|
38 | init_serial();
|
39 |
|
40 | while(1)
|
41 | {
|
42 |
|
43 | putchar(getchar()); //Echo terminal
|
44 | }
|
45 | }
|
46 |
|
47 | void init_serial (void) /* Initialize Serial Interface */
|
48 | {
|
49 | PINSEL0 = 0x00050000; /* Enable RxD1 and TxD1 */
|
50 | U1LCR = 0x81; /* 8 bits, no Parity, 1 Stop bit */
|
51 | U1DLL = 0x81; /* 9600 Baud Rate @ 30MHz VPB Clock */
|
52 | U1LCR = 0x81; /* DLAB = 0 */
|
53 | }
|
54 |
|
55 |
|
56 | int putchar (int ch) /* Write character to Serial Port */
|
57 | {
|
58 |
|
59 | if (ch == '\n') {
|
60 | while (!(U1LSR & 0x20));
|
61 | U1THR = CR; /* output CR */
|
62 | }
|
63 | while (!(U1LSR & 0x20));
|
64 | return (U1THR = ch);
|
65 | }
|
66 |
|
67 |
|
68 | int getchar (void) /* Read character from Serial Port */
|
69 | {
|
70 |
|
71 | while (!(U1LSR & 0x01));
|
72 |
|
73 | return (U1RBR);
|
74 | }
|