AN2295 Freescale Semiconductor / Motorola, AN2295 Datasheet - Page 47

no-image

AN2295

Manufacturer Part Number
AN2295
Description
Developers Serial Bootloader for M68HC08 and HCS08 MCUs
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
UART Manipulations
In
functions are defined:
int init_uart(char* nm);
int close_uart(void);
int send_break10(void);
int flush_uart(int out, int in);
int wb(const void* data, unsigned len);
int rb(void* dest, unsigned len);
The pair
closing of the specified UART port.
The pair
used for writing and reading blocks of data into/out of UART.
Two additional functions are required for the bootloader to work:
int flush_uart(int out, int in)
cleans up both directions (in/out) of the UART buffers.
System Platform Dependent Files
The header file
software is being compiled. The platform-specific declarations are then used.
Generic and Main Program Files
The header file
application. The file
Figure
M68HC(S)08 Specific Programming Files
The most important part of the PC master bootloader software is contained in the file
most of the intelligence of the PC bootloader software as mentioned in previous sections.
Numerous routines are implemented in the
int hook_reset(void)
int could_be_ack(unsigned b)
int calibrate_speed(void)
int read_mcu_info(void)
int setup_vect_tbl(void)
int check_image()
int read_blk(unsigned adr, int len, BYTE *dest)
int erase_blk(unsigned a)
int prg_blk(unsigned a, int len)
int prg_area(unsigned start, unsigned end)
int prg_mem(void)
int unhook(void)
Freescale Semiconductor
seriallinux.c
29).
int init_uart(char* nm)
int wb(const void* data, unsigned len)
sysdep.h
hc08sprg.h
or
main.c
serialw32.c,
Developer’s Serial Bootloader for M68HC08 and HCS08 MCUs, Rev. 6
includes either
contains the main program and is shown at the beginning of this section (see
contains the rest of the generic declarations needed to compile the
depending on the platform used, the following UART manipulation
and
. The first sends a BREAK character to the UART, the second
sysdeplinux.h
int close_uart(void)
prog.c
file:
and
or
sysdepw32.h
int rb(void* dest, unsigned len)
int send_break10(void)
manage opening (initialization) and
, depending on which platform
PC Bootloader Master Software
prog.c
implements
and
is
47

Related parts for AN2295