Minimum files required to program the Coldfire MCF51JM128 micorcontroller

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Minimum files required to program the Coldfire MCF51JM128 micorcontroller

1,588 Views
Nikolai
Contributor I
I recently bought the Badge board to take part in the competition. It is a revision C board with the MCF51JM128 coldfire microcontroller.

Im a beginner and not much acquainted with programming procedure. So i downloaded the sample LED Blink code from the CanYourBadgeDoThis resources page.

The "sources folder" in the zip file contains the following code files :

bootloader.h
derivative.h
exceptions.c
exceptions.h
ledapp.c
ledapp.h
main.c
mpr084.c
mpr084.h
startcf.c
startcf.h

The role of bootloader.h, derivative.h, exceptions.c, exceptions.h, startcf.c, startcf.h  is not clear to me.
My query is, which are the bare minimum files needed to write a simple LED blink program.

It would be great if someone can throw some light on what the above mentioned files do.
Btw, does the bootloader get erased and reprogrammed each time i program the microcontroller ?



Labels (1)
0 Kudos
2 Replies

377 Views
anthony_huereca
NXP Employee
NXP Employee
To answer the second part of your question, if you use the USB bootloader to drag-and-drop an s19 file onto your board, the bootloader is not erased. It only erases the memory locations where the demo program code is stored, and will then reprogram it with the new s19 code you had dragged on there.

The bootloader would only get erased if you use a USB Multilink device to do a full erase.

See Section 4.3 of the Badge Board User's Manual for more information on how to use the bootloader:
http://canyourbadgedothis.com/BadgeBoardReferences.aspx


Message Edited by amh on 2008-12-16 07:44 PM
0 Kudos

377 Views
J2MEJediMaster
Specialist I
I'm not familiar with this particular processor, but know enough about how CodeWarrior does things to provide some answers.

bootloader.h: Addresses useful if you're writing bootloader code, such as the Flash programming registers.
derivative.h: Provides peripheral device addresses and the memory map specific to the processor family.
exceptions.c
exceptions.h: Provides addresses and code used to implement the processor's exception vector table and support device interrupts.
startcf.c
startcf.h: Provides addresses and code that initializes the processor and its peripherals out of reset, establishes the C run-time environment, and then transfers execution to your main() function.

HTH

---Tom
0 Kudos