mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 03:45:50 +08:00
tools/pic32: Add description, fix nxstyle, fix typos
* tools/pic32/Config.mk: Fix typo. * tools/pic32/mkpichex.c: (): Add one-line description of this file. (adjust_extlin): Fix nxstyle error and typo in comment.
This commit is contained in:
committed by
Xiang Xiao
parent
8231485eff
commit
69feebe48c
@@ -19,7 +19,7 @@
|
|||||||
############################################################################
|
############################################################################
|
||||||
|
|
||||||
# These are the macros that will be used in the NuttX make system to compile
|
# These are the macros that will be used in the NuttX make system to compile
|
||||||
# and assembly source files and to insert the resulting object files into an
|
# and assemble source files and to insert the resulting object files into an
|
||||||
# archive. These replace the default definitions at tools/Config.mk
|
# archive. These replace the default definitions at tools/Config.mk
|
||||||
|
|
||||||
# POSTBUILD -- Perform post build operations
|
# POSTBUILD -- Perform post build operations
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* tools/pic32/mkpichex.c
|
* tools/pic32/mkpichex.c
|
||||||
|
* Convert virtual addresses in nuttx.hex to physical addresses
|
||||||
*
|
*
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
* contributor license agreements. See the NOTICE file distributed with
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
@@ -205,14 +206,14 @@ static void adjust_extlin(struct hex_s *hexline)
|
|||||||
segment &= 0x1fff;
|
segment &= 0x1fff;
|
||||||
|
|
||||||
/* Recalculate the checksum and make sure that there is a null terminator
|
/* Recalculate the checksum and make sure that there is a null terminator
|
||||||
* Since len=2, addr=0, type=4, the is a trivial calculation.
|
* Since len=2, addr=0, type=4, this is a trivial calculation.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
chksum = (-(segment + (segment >> 8) + 6)) & 0xff;
|
chksum = (-(segment + (segment >> 8) + 6)) & 0xff;
|
||||||
|
|
||||||
/* Then create the new output record */
|
/* Then create the new output record */
|
||||||
|
|
||||||
snprintf(line, MAX_LINE-PAYLOAD_OFFSET, ":02000004%04X%02X\n",
|
snprintf(line, MAX_LINE - PAYLOAD_OFFSET, ":02000004%04X%02X\n",
|
||||||
segment, chksum);
|
segment, chksum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user