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:
Nathan Hartman 2022-09-12 23:38:16 -04:00 committed by Xiang Xiao
parent 8231485eff
commit 69feebe48c
2 changed files with 4 additions and 3 deletions

View File

@ -19,7 +19,7 @@
############################################################################
# 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
# POSTBUILD -- Perform post build operations

View File

@ -1,5 +1,6 @@
/****************************************************************************
* tools/pic32/mkpichex.c
* Convert virtual addresses in nuttx.hex to physical addresses
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@ -205,14 +206,14 @@ static void adjust_extlin(struct hex_s *hexline)
segment &= 0x1fff;
/* 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;
/* 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);
}