Other Parts Discussed in Thread: C2000WARE
Hi,
I have a LAUNCHXL-F280025C card. I'm just learning the development I have written a sample code and ran it in RAM, everything is fine.
But I want to load the code to flash and I was not successful. I found a code like below but it didn't work. How can I boot using flash.c and flash.h libraries?
If there is a short code, please help me.
My goal is just to make the whole code work with FLASH and not in RAM.
Thank you for your interest in advance.
the code I found but could not run:
// memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize); // Flash -> RAM
// InitFlash();
// INCLUDED FILES
#include "driverlib.h"
#include "device.h"
#include "board.h"
#include "c2000ware_libraries.h"
void init_setup_GPIO();
void init_signal_tester();
void init_signals_and_comparator();
// ****
// Here my variables are defined
// ****
//
// Main
//
void main(void)
{
// !! I need help on what to write here for the flash process !!
// Initialize device clock and peripherals
//
Device_init();
//
// Disable pin locks and enable internal pull-ups.
//
Device_initGPIO();
//
// Initialize PIE and clear PIE registers. Disables CPU interrupts.
//
Interrupt_initModule();
//
// Initialize the PIE vector table with pointers to the shell Interrupt
// Service Routines (ISR).
//
Interrupt_initVectorTable();
//
// PinMux and Peripheral Initialization
//
Board_init();
//
// C2000Ware Library initialization
//
C2000Ware_libraries_init();
//
// Enable Global Interrupt (INTM) and real time interrupt (DBGM)
//
EINT;
ERTM;
while ( (GPIO_readPin(start_button)) == 0 )
{
// SINYAL GIRISI BEKLENIYOR
}
while ( (GPIO_readPin(start_button)) == 1 )
{
// TEST KODU BASLIYOR
init_setup_GPIO();
init_signals_and_comparator();
//DEVICE_DELAY_US(250);
}
}
// *****
// I have my functions down in here
// *****