Other Parts Discussed in Thread: HALCOGEN
Hello,
Currently working with a TMS 470 evaluation kit which has an on board XDS100V2 emulator probe.
I am able to create project shells with HALCOGEN but I am unable load the FlashEABI_Flash example code, here is my process:
First importing the project from the .pjt file:
in this case I trying to use the 'FlashEABI_Flash.pjt:
Following the instructions from the 'TMS470/570 Platform F035 Flash API Reference
Guide v1.09' use the following configuration settings (I have tried all three libraries):
When I try to debug the code I get the following list of errors:
coming from my boot.asm file:
;******************************************************************************
;* BOOT v2.17 *
;* Copyright (c) 1996-2001 Texas Instruments Incorporated *
;******************************************************************************
;****************************************************************************
;* BOOT.ASM
;*
;* THIS IS THE INITAL BOOT ROUTINE FOR TMS470 C++ PROGRAMS.
;* IT MUST BE LINKED AND LOADED WITH ALL C++ PROGRAMS.
;*
;* THIS MODULE PERFORMS THE FOLLOWING ACTIONS:
;* 1) ALLOCATES THE STACK AND INITIALIZES THE STACK POINTER
;* 2) PERFORMS AUTO-INITIALIZATION
;* 3) CALLS INITALIZATION ROUTINES FOR FILE SCOPE CONSTRUCTION
;* 4) CALLS THE FUNCTION MAIN TO START THE C++ PROGRAM
;* 5) CALLS THE STANDARD EXIT ROUTINE
;*
;* THIS MODULE DEFINES THE FOLLOWING GLOBAL SYMBOLS:
;* 1) __stack STACK MEMORY AREA
;* 2) _c_int00 BOOT ROUTINE
;*
;****************************************************************************
;****************************************************************************
;* 32 BIT STATE BOOT ROUTINE *
;****************************************************************************
.global __stack
;***************************************************************
;* DEFINE THE USER MODE STACK (DEFAULT SIZE IS 512)
;***************************************************************
__stack:.usect ".stack", 0, 4
.global _c_int00
.global _StackFIQ_pv
.global _StackIRQ_pv
.global _StackSVC_pv
.global _StackABT_pv
.global _StackUDEF_pv
.global _StackUSER_pv
.global _pexit
FIQ_SP_ADD .word _StackFIQ_pv ;FIQ Stack pointer init value
IRQ_SP_ADD .word _StackIRQ_pv ;IRQ Stack pointer init value
SVC_SP_ADD .word _StackSVC_pv ;IRQ Stack pointer init value
ABT_SP_ADD .word _StackABT_pv ;ABT Stack pointer init value
UDEF_SP_ADD .word _StackUDEF_pv ;UNDEF Stack pointer init value
USER_SP_ADD .word _StackUSER_pv ;USER/SYSTEM Stack pointer init value
;***************************************************************
;* FUNCTION DEF: _c_int00
;***************************************************************
_c_int00:
.mmsg "CPSR Resvd. Bits Altered - Future CPU Architecture May Be Incompatable"
;*------------------------------------------------------
;* INITIALIZE FIQ MODE STACK POINTER
;*------------------------------------------------------
mov r0, #0;
mov r1, #0;
mov r2, #0;
mov r3, #0;
mov r4, #0;
mov r5, #0;
mov r6, #0;
mov r7, #0;
mov r8, #0;
mov r9, #0;
mov r10, #0;
mov r11, #0;
mov r12, #0;
MOV r0, #0x11 ;FIQ Mode = 10001
MSR cpsr, r0
LDR r13, FIQ_SP_ADD
;*------------------------------------------------------
;* INITIALIZE SUPERVISOR MODE STACK POINTER
;*------------------------------------------------------
MOV r0, #0x13 ;SVC Mode = 10011
MSR cpsr, r0
LDR r13, SVC_SP_ADD
;*------------------------------------------------------
;* INITIALIZE ABORT MODE STACK POINTER
;*------------------------------------------------------
MOV r0, #0x17 ;ABT Mode = 10111
MSR cpsr, r0
LDR r13, ABT_SP_ADD
;*------------------------------------------------------
;* INITIALIZE IRQ MODE STACK POINTER
;*------------------------------------------------------
MOV r0, #0x12 ;IRQ Mode = 10010
MSR cpsr, r0
LDR r13, IRQ_SP_ADD
;*------------------------------------------------------
;* INITIALIZE UNDEFINED MODE STACK POINTER
;*------------------------------------------------------
MOV r0, #0x1B ;UDEF Mode = 11011
MSR cpsr, r0
LDR r13, UDEF_SP_ADD
;*------------------------------------------------------
;* INITIALIZE SYSTEM/USER MODE STACK POINTER
;*------------------------------------------------------
MOV r0, #0xDF ;System Mode = 11011111
MSR cpsr, r0 ;IRQ, FIQ unmasking needs to be done in main.
LDR r13, USER_SP_ADD
; ;*------------------------------------------------------
; ;* SET TO USER MODE
; ;*------------------------------------------------------
; MRS r0, cpsr
; BIC r0, r0, #0x1F ; CLEAR MODES
; ORR r0, r0, #0x10 ; SET USER MODE
; MSR cpsr, r0
; ;*------------------------------------------------------
; ;* INITIALIZE THE USER MODE STACK
; ;*------------------------------------------------------
; LDR sp, c_stack
; LDR r0, c_STACK_SIZE
; ADD sp, sp, r0
;*------------------------------------------------------
;* Initialize the device (system, memmory map, etc)
;*------------------------------------------------------
BL _init
BL _main
;*------------------------------------------------------
;* IF APPLICATION DIDN'T CALL EXIT, CALL EXIT(1)
;*------------------------------------------------------
MOV R0, #1
; BL _exit
_pexit B _pexit
;*------------------------------------------------------
;* DONE, LfOOP FOREVER
;*------------------------------------------------------
L1: B L1
;***************************************************************************
;* PROCESS INITIALIZATION TABLE.
;*
;* THE TABLE CONSISTS OF A SEQUENCE OF RECORDS OF THE FOLLOWING FORMAT:
;*
;* .word <length of data (bytes)>
;* .word <address of variable to initialize>
;* .word <data>
;*
;* THE INITIALIZATION TABLE IS TERMINATED WITH A ZERO LENGTH RECORD.
;*
;***************************************************************************
tbl_addr: .set R0
var_addr: .set R1
length: .set R2
data: .set R3
auto_init:
B rec_chk
;*------------------------------------------------------
;* PROCESS AN INITIALIZATION RECORD
;*------------------------------------------------------
record: LDR var_addr, [tbl_addr], #4 ;
;*------------------------------------------------------
;* COPY THE INITIALIZATION DATA
;*------------------------------------------------------
TST var_addr, #3 ; SEE IF DEST IS ALIGNED
BNE _bcopy ; IF NOT, COPY BYTES
SUBS length, length, #4 ; IF length <= 3, ALSO
BMI _bcont ; COPY BYTES
_wcopy: LDR data, [tbl_addr], #4 ;
STR data, [var_addr], #4 ; COPY A WORD OF DATA
SUBS length, length, #4 ;
BPL _wcopy ;
_bcont: ADDS length, length, #4 ;
BEQ _cont ;
_bcopy: LDRB data, [tbl_addr], #1 ;
STRB data, [var_addr], #1 ; COPY A BYTE OF DATA
SUBS length, length, #1 ;
BNE _bcopy ;
_cont: ANDS length, tbl_addr, #0x3 ; MAKE SURE THE ADDRESS
RSBNE length, length, #0x4 ; IS WORD ALIGNED
ADDNE tbl_addr, tbl_addr, length ;
rec_chk:LDR length, [tbl_addr], #4 ; PROCESS NEXT
CMP length, #0 ; RECORD IF LENGTH IS
BNE record ; NONZERO
MOV PC, LR
;***************************************************************
;* CONSTANTS USED BY THIS MODULE
;***************************************************************
c_stack .long __stack
c_STACK_SIZE .long __STACK_SIZE
;******************************************************
;* UNDEFINED REFERENCES *
;******************************************************
.global IND_CALL
.global _exit
.global _main
.global _init
.global __STACK_SIZE
.end
My hunch is a simple configuration change or a compiler issue (tried the most current version as well as 5.1.6 as referenced in the API document).
As I am sure you can tell - I am quite the rookie in the embedded system world! I will keep plugging away and look forward to any feed back!
Best,
Chris