Jump to content
CorB

Problems in Example_F2802xLaunchPadDemo

Recommended Posts

Hi all,

 

Using the TI resource explorer (works great and is helpfull) I finally managed to upload some example code onto the C2000. One thing that wasnt directly clear to me was that you had to select Texas XDS100v2 USB emulator in the resource explorer to get the code running. I was getting issues that the software did not connect via FET to the launchpad .. tried setting the switches different (what is considered a default setting for the switches when programming ? I now have S1-3=ON S4=OFF ). But after that the CCS debugger started to work and the code got loaded onto the launchpad without a problem, by changing the delay between the blue leds blinking during startup I have checked that its actually indeed running the uploaded code. So far so good.

 

I am let with a few questions, although not lethal the debugger spit out several problems in the original code. As I am a real novice on the C2000 I wonder how important these problems are. Its always good to know if a problem is just a minor nag or a real problem that will only pop out once your program runs for some time.

 

Find below the problems reported.

 

kind regards

 

Cor

 

 


**** Build of configuration Flash for project Example_F2802xLaunchPadDemo ****

C:\TI\ccsv5\utils\bin\gmake -k all
'Building file: ../Example_F2802xLaunchPadDemo.c'
'Invoking: C2000 Compiler'
"C:/TI/ccsv5/tools/compiler/c2000_6.1.0/bin/cl2000" -v28 -ml -mt -O0 -g --include_path="C:/TI/ccsv5/tools/compiler/c2000_6.1.0/include" --include_path="C:/ti/controlSUITE/development_kits/C2000_LaunchPad" --include_path="C:/TI/xdais_7_21_01_07/packages/ti/xdais" --define="_FLASH" --define=NDEBUG --define="_DEBUG" --define="LARGE_MODEL" --quiet --verbose_diagnostics --diag_warning=225 --gen_func_subsections=on --output_all_syms --cdebug_asm_data --preproc_with_compile --preproc_dependency="Example_F2802xLaunchPadDemo.pp"  "../Example_F2802xLaunchPadDemo.c"
"../Example_F2802xLaunchPadDemo.c", line 373: warning: argument of type
	  "int (*)(int, char *, unsigned int)" is incompatible with parameter
	  of type "int (*)(int, const char *, unsigned int)"
  status = add_device("scia", _SSA, SCI_open, SCI_close, SCI_read, SCI_write, SCI_lseek, SCI_unlink, SCI_rename);
																   ^

"../Example_F2802xLaunchPadDemo.c", line 280: warning: variable "fid" was set
	  but never used
  volatile FILE *fid;
				 ^

'Finished building: ../Example_F2802xLaunchPadDemo.c'
' '
'Building target: Example_F2802xLaunchPad_demo.out'
'Invoking: C2000 Linker'
"C:/TI/ccsv5/tools/compiler/c2000_6.1.0/bin/cl2000" -v28 -ml -mt -O0 -g --define="_FLASH" --define=NDEBUG --define="_DEBUG" --define="LARGE_MODEL" --quiet --verbose_diagnostics --diag_warning=225 --gen_func_subsections=on --output_all_syms --cdebug_asm_data -z --stack_size=0x300 -m"Example_F2802xLaunchPad_demo.map" --heap_size=0x200 --warn_sections -i"C:/TI/ccsv5/tools/compiler/c2000_6.1.0/lib" -i"C:/TI/ccsv5/tools/compiler/c2000_6.1.0/include" -i"C:/Users/Biz/Documents/CCSworkspace5_1/Example_F2802xLaunchPadDemo" -i"C:/ti/controlSUITE/development_kits/C2000_LaunchPad/F2802x_common/lib" --reread_libs --verbose_diagnostics --issue_remarks --entry_point=code_start --rom_model -o "Example_F2802xLaunchPad_demo.out"  "./Example_F2802xLaunchPadDemo.obj" -l"C:/ti/controlSUITE/development_kits/C2000_LaunchPad/f2802x_examples/C2kLaunchPadDemo/../../f2802x_common/cmd/F28027.cmd" -l"rts2800_ml.lib" -l"IQmath.lib" "C:/TI/controlSUITE/development_kits/C2000_LaunchPad/f2802x_headers/cmd/F2802x_Headers_nonBIOS.cmd" "C:/TI/controlSUITE/development_kits/C2000_LaunchPad/f2802x_common/lib/driverlib.lib"
"C:/ti/controlSUITE/development_kits/C2000_LaunchPad/f2802x_examples/C2kLaunchPadDemo/../../f2802x_common/cmd/F28027.cmd", line 117: warning:
  memory range not found: FLASHD. on page 0
  .text			   : >> FLASHA | FLASHC | FLASHD.	   PAGE = 0
warning: entry-point symbol other than "_c_int00" specified:  "code_start"
'Finished building target: Example_F2802xLaunchPad_demo.out'
' '

**** Build Finished ****

Share this post


Link to post
Share on other sites

CorB,

 

Glad to hear things are working for you. By default I would recommend you keep all the switches in the up position during debugging. S4 really doesn't matter as it is just used to prevent contention on the serial lines should more than two devices be connected to the serial lines. S1controls how the board boots up. Basically if you are debugging you want all the switches up, if you are running standalone you want the switch on the right in the down position. There are other modes as well that can be read about in the BootROM users guide.

 

Now on to the warnings:

"../Example_F2802xLaunchPadDemo.c", line 373: warning: argument of type
"int (*)(int, char *, unsigned int)" is incompatible with parameter
of type "int (*)(int, const char *, unsigned int)"
status = add_device("scia", _SSA, SCI_open, SCI_close, SCI_read, SCI_write, SCI_lseek, SCI_unlink, SCI_rename);

This is a very minor warning. You can see the function wanted a char * and I passed it a const char *. 99.9% of the time this won't cause an issue, but it will depend on the function you are passing the messed up variable to.

 

"../Example_F2802xLaunchPadDemo.c", line 280: warning: variable "fid" was set
but never used
volatile FILE *fid;

This warning just means we saved a value in a variable but never did anything with it. Typically you'll get these when you've added variables for debugging purposes that aren't used else where in your application. These warnings may always be safely ignored.

 

../f2802x_common/cmd/F28027.cmd", line 117: warning:
memory range not found: FLASHD. on page 0
.text : >> FLASHA | FLASHC | FLASHD. PAGE = 0

This warning is due to a typo that snuck past me. There is a FlashD in the memory map, but in the linker file somehow a period accidentally got typed instead of a comma. If you change the line to read:

.text : >> FLASHA | FLASHC | FLASHD, PAGE = 0

you won't get this warning. I'm aware of this typo and it will be fixed in the next release.

 

warning: entry-point symbol other than "_c_int00" specified: "code_start"

All of TI's code gen tools really like your application to start with a symbol called _c_int00. We however supply a piece of code called CodeStartBranch which does some handy things like turn off the watchdog so its easier to debug. In our example applications we manually set the program entry point in the project properties to code_start. If anything other than _c_int00 is used you will get a warning like this. This warning can be safely ignored.

 

Hope that helps!!! :)

Share this post


Link to post
Share on other sites

Thanks for both the speed and quality of the response !!

 

 

Just tested, changing the FLASH code worked, that warning is gone.

Removing the line volatile FILE *fid; however did not work, it raised an error since we also have the line

fid = fopen("scia","w"); So the variable was used ... I can live with the warning !

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...