Skip to content

Commit

Permalink
flash/nor: update support for TI MSP432 devices
Browse files Browse the repository at this point in the history
Added fixes for issues found in additional code reviews.

Fixed host Endianness issues with using buffer reads
and writes instead of the *_u32 variants.

Changed code that tried to ID banks by hardcode
bank_number values to use instead the bank base
address. This fixes problems using configurations
with multiple devices.

Note that this replaces Change 4786 which has
been abandoned because of extensive changes to
the code to stop IDing banks by name.  And I
think I really messed up a rebase/merge on the
document file.

Tested on MSP432P401R, MSP432P4111, and MSP432E401Y
Launchpads.

Change-Id: Id05798b3aa78ae5cbe725ee762a164d673ee5767
Signed-off-by: Edward Fewell <efewell@ti.com>
Reviewed-on: http://openocd.zylin.com/5481
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
  • Loading branch information
Edward Fewell authored and tom-van committed Mar 7, 2020
1 parent e9932ef commit 82a5c55
Show file tree
Hide file tree
Showing 3 changed files with 127 additions and 117 deletions.
8 changes: 4 additions & 4 deletions doc/openocd.texi
Original file line number Diff line number Diff line change
Expand Up @@ -6299,14 +6299,14 @@ if @{ [info exists IMEMORY] && [string equal $IMEMORY true] @} @{
All versions of the SimpleLink MSP432 microcontrollers from Texas
Instruments include internal flash. The msp432 flash driver automatically
recognizes the specific version's flash parameters and autoconfigures itself.
Main program flash (starting at address 0) is flash bank 0. Information flash
region on MSP432P4 versions (starting at address 0x200000) is flash bank 1.
Main program flash starts at address 0. The information flash region on
MSP432P4 versions starts at address 0x200000.

@example
flash bank $_FLASHNAME msp432 0 0 0 0 $_TARGETNAME
@end example

@deffn Command {msp432 mass_erase} [main|all]
@deffn Command {msp432 mass_erase} bank_id [main|all]
Performs a complete erase of flash. By default, @command{mass_erase} will erase
only the main program flash.

Expand All @@ -6315,7 +6315,7 @@ main program and information flash regions. To also erase the BSL in information
flash, the user must first use the @command{bsl} command.
@end deffn

@deffn Command {msp432 bsl} [unlock|lock]
@deffn Command {msp432 bsl} bank_id [unlock|lock]
On MSP432P4 versions, @command{bsl} unlocks and locks the bootstrap loader (BSL)
region in information flash so that flash commands can erase or write the BSL.
Leave the BSL locked to prevent accidentally corrupting the bootstrap loader.
Expand Down
Loading

0 comments on commit 82a5c55

Please sign in to comment.