Forum: Digitale Signalverarbeitung / DSP / Machine Learning FlashAPI F2812


von Franzi (Gast)


Lesenswert?

Hallo,

ich bin gerade dabei die FlashAPI von TI in mein Projekt einzubinden,
bekomme aber immer folgende Warnmeldung:

 warning: load address of uninitialized section Flash28_API ignored

Ich führe nur den ToggleTest der API aus und dieser läuft auch nicht auf 
10 kHz, wie vorgeschrieben, deswegen vermute ich das es mit der 
Fehlermeldung zusammenhängt. Mir ist aber unklar warum er die Adresse 
ignoriert.
Hier noch der SECTIONS-Teil aus meiner cmd-Datei.
1
   Flash28_API:
2
   {
3
        -lFlash2812_API_V210.lib(.econst) 
4
        -lFlash2812_API_V210.lib(.text)
5
   }               
6
                LOAD = FLASHD, 
7
                       RUN = RAML0, 
8
                       LOAD_START(_Flash28_API_LoadStart),
9
                       LOAD_END(_Flash28_API_LoadEnd),
10
                       RUN_START(_Flash28_API_RunStart),
11
                       PAGE = 0

Hat jemad eine Idee was da falsch sein könnte?

von Micha (Gast)


Lesenswert?

Kannst/Darfst du das ganze Projekt hochladen, oder zumindest eine 
Minimalversion, bei der der Fehler noch auftritt?

von Micha (Gast)


Lesenswert?

Inkl. cmd-Dateien usw.

von Franzi (Gast)


Lesenswert?

hab das Projekt zum probieren auch schon ziemlich reduziert...

cmd
1
/* Linker command File for Memory Sections -> Flash RAM.. */
2
/* FN 30.03.2010 */
3
4
MEMORY
5
{
6
PAGE 0:    /* Program Memory */
7
           /* Memory (RAM/FLASH/OTP) blocks can be moved to PAGE1 for data allocation */
8
9
   ZONE0       : origin = 0x002000, length = 0x002000     /* XINTF zone 0 */
10
   ZONE1       : origin = 0x004000, length = 0x002000     /* XINTF zone 1 */
11
   RAML0       : origin = 0x008000, length = 0x001000     /* on-chip RAM block L0 */
12
   RAML1       : origin = 0x009000, length = 0x001000     /* on-chip RAM block L1 */
13
   ZONE2       : origin = 0x080000, length = 0x080000     /* XINTF zone 2 */
14
   OTP         : origin = 0x3D7800, length = 0x000800     /* on-chip OTP */
15
   FLASHJ      : origin = 0x3D8000, length = 0x002000     /* on-chip FLASH */
16
   FLASHI      : origin = 0x3DA000, length = 0x002000     /* on-chip FLASH */
17
   FLASHH      : origin = 0x3DC000, length = 0x004000     /* on-chip FLASH */
18
   FLASHG      : origin = 0x3E0000, length = 0x004000     /* on-chip FLASH */
19
   FLASHF      : origin = 0x3E4000, length = 0x004000     /* on-chip FLASH */
20
   FLASHE      : origin = 0x3E8000, length = 0x004000     /* on-chip FLASH */
21
   FLASHD      : origin = 0x3EC000, length = 0x004000     /* on-chip FLASH */
22
   FLASHC      : origin = 0x3F0000, length = 0x004000     /* on-chip FLASH */
23
   FLASHB      : origin = 0x3F4000, length = 0x002000     /* on-chip FLASH */
24
   FLASHA      : origin = 0x3F6000, length = 0x001F80     /* on-chip FLASH */
25
   CSM_RSVD    : origin = 0x3F7F80, length = 0x000076     /* Part of FLASHA.  Program with all 0x0000 when CSM is in use. */
26
   BEGIN       : origin = 0x3F7FF6, length = 0x000002     /* Part of FLASHA.  Used for "boot to Flash" bootloader mode. */
27
   CSM_PWL     : origin = 0x3F7FF8, length = 0x000008     /* Part of FLASHA.  CSM password locations in FLASHA */
28
/* ZONE7       : origin = 0x3FC000, length = 0x003FC0     /* XINTF zone 7 available if MP/MCn=1 */ 
29
   ROM         : origin = 0x3FF000, length = 0x000FC0     /* Boot ROM available if MP/MCn=0 */
30
   RESET       : origin = 0x3FFFC0, length = 0x000002     /* part of boot ROM (MP/MCn=0) or XINTF zone 7 (MP/MCn=1) */
31
   VECTORS     : origin = 0x3FFFC2, length = 0x00003E     /* part of boot ROM (MP/MCn=0) or XINTF zone 7 (MP/MCn=1) */
32
33
PAGE 1 :
34
35
   RAMM0       : origin = 0x000000, length = 0x000400     /* on-chip RAM block M0 */
36
   RAMM1       : origin = 0x000400, length = 0x000400     /* on-chip RAM block M1 */
37
   RAMH0       : origin = 0x3F8000, length = 0x002000     /* on-chip RAM block H0 */
38
39
   ZONE6       : origin = 0x100000, length = 0x080000     /* XINTF zone 6 */   
40
41
}
42
43
44
SECTIONS
45
{
46
 
47
   Flash28_API:
48
   {
49
        -lFlash2812_API_V210.lib(.econst) 
50
        -lFlash2812_API_V210.lib(.text)
51
   }                   LOAD = FLASHD, 
52
                       RUN = RAML0, 
53
                       LOAD_START(_Flash28_API_LoadStart),
54
                       LOAD_END(_Flash28_API_LoadEnd),
55
                       RUN_START(_Flash28_API_RunStart),
56
                       PAGE = 0
57
 
58
   /* Allocate program areas: */
59
   .cinit              : > FLASHA      PAGE = 0
60
   .pinit              : > FLASHA,     PAGE = 0
61
   .text               : > FLASHC      PAGE = 0
62
63
   codestart           : > BEGIN       PAGE = 0
64
   ramfuncs            : LOAD = FLASHD, 
65
                         RUN = RAML0, 
66
                         LOAD_START(_RamfuncsLoadStart),
67
                         LOAD_END(_RamfuncsLoadEnd),
68
                         RUN_START(_RamfuncsRunStart),
69
                         PAGE = 0
70
71
   csmpasswds          : > CSM_PWL     PAGE = 0
72
   csm_rsvd            : > CSM_RSVD    PAGE = 0
73
   
74
   /* Allocate uninitalized data sections: */
75
   .stack              : > RAMM0       PAGE = 1
76
   /* ebss = Daten-RAM*/
77
   .ebss               : > ZONE6       PAGE = 1
78
   .esysmem            : > RAMH0       PAGE = 1
79
80
   /* Initalized sections go in Flash */
81
   /* For SDFlash to program these, they must be allocated to page 0 */
82
   .econst             : > FLASHA      PAGE = 0
83
   .switch             : > FLASHA      PAGE = 0      
84
85
   /* Allocate IQ math areas: */
86
   IQmath              : > FLASHC      PAGE = 0                  /* Math Code */
87
   IQmathTables        : > ROM         PAGE = 0, TYPE = NOLOAD   /* Math Tables In ROM */
88
89
   /* .reset is a standard section used by the compiler.  It contains the */ 
90
   /* the address of the start of _c_int00 for C Code.   /*
91
   /* When using the boot ROM this section and the CPU vector */
92
   /* table is not needed.  Thus the default type is set here to  */
93
   /* DSECT  */ 
94
   .reset              : > RESET,      PAGE = 0, TYPE = DSECT
95
   vectors             : > VECTORS     PAGE = 0, TYPE = DSECT
96
   
97
98
99
}

main.c
1
#include "Flash281x_API_Config.h"
2
#include "Flash281x_API_Library.h"
3
4
// für ToggleTest
5
6
#define GPAMUX       (volatile Uint16*)0x000070C0   /* GPIO A mux control register */
7
#define GPATOGGLE    (volatile Uint16*)0x000070E3   /* GPIO A toggle register */
8
#define GPIOA0_PWM1_MASK      0x0001
9
#define WDKEY        (volatile Uint16*)0x00007025   /* Watchdog key register */
10
FLASH_ST EraseStatus;
11
FLASH_ST ProgStatus;
12
FLASH_ST VerifyStatus; 
13
void main(void)
14
{
15
   Uint16 i;
16
17
18
  if(SysCtrlRegs.PLLCR.all != 0x000A) 
19
    {
20
       EALLOW;
21
       SysCtrlRegs.PLLCR.all = 0x000A;
22
       
23
       // Wait for PLL to lock
24
       // Each time through this loop takes ~14 cycles
25
       // PLL Lock time is 131072 Cycles
26
       for(i= 0; i< 131072/14; i++){
27
           *WDKEY = 0x0055;
28
           *WDKEY = 0x00AA;
29
       }
30
       EDIS;
31
    }
32
33
    // Copy the Flash API functions to SARAM
34
    MemCopy(&Flash28_API_LoadStart, &Flash28_API_LoadEnd, &Flash28_API_RunStart);
35
36
    // We must also copy required user interface functions to RAM. 
37
    MemCopy(&RamfuncsLoadStart, &RamfuncsLoadEnd, &RamfuncsRunStart);
38
39
  
40
   Flash_CPUScaleFactor = SCALE_FACTOR;
41
   
42
   Flash_CallbackPtr = 0;//&MyCallbackFunction; 
43
   
44
//   MyCallbackCounter = 0; // Increment this counter in the callback function
45
                                  
46
   
47
   // Jump to SARAM and call the Flash API functions
48
     Flash_ToggleTest(GPAMUX,GPATOGGLE,GPIOA0_PWM1_MASK);
49
}

von Micha (Gast)


Lesenswert?

Kannst du alle benötigten Dateien zusammenpacken und als zip anhängen? 
Ich habe die Flash-API bei mir nicht installiert. Nutzt du CCS 3 oder 4?

von Franzi (Gast)


Angehängte Dateien:

Lesenswert?

Ich arbeite mit CCS 3.3
Im Anhang die FlashAPI von TI und mein Projekt,
ist jetzt schon auf ziemlich wenig reduziert, aber den Fehler bekomm ich 
nicht weg :-(

von Franzi (Gast)


Lesenswert?

Ich hab den Fehler gefunden ;-)
Man muss die FlashAPI.lib bei den build-options mit in die link order 
List aufnehmen, das ist im Beispielprojekt von TI zwar auch nicht so 
drin,
aber dort ist die Ordnerstruktur auch anders.

Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.