ソースを参照

Adding convenience loader scripts for DFU based microcontrollers

simple
Jacob Alexander 9年前
コミット
3b06d8f6ae
5個のファイルの変更32行の追加18行の削除
  1. 22
    0
      Lib/CMake/build.cmake
  2. 0
    16
      Lib/CMake/modules.cmake
  3. 8
    0
      LoadFile/load.dfu
  4. 1
    1
      LoadFile/load.teensy
  5. 1
    1
      LoadFile/winload.teensy

+ 22
- 0
Lib/CMake/build.cmake ファイルの表示

COMMENT "Chip usage for ${CHIP}" COMMENT "Chip usage for ${CHIP}"
) )




###
# Setup Loader Script and Program
#

#| First check for DFU based controllers
if( DEFINED DFU )
configure_file( LoadFile/load.dfu load NEWLINE_STYLE UNIX )

#| Next check for Teensy based
elseif ( DEFINED TEENSY )
# Provides the user with the correct teensy-loader-cli command for the built .HEX file
# Windows
if( CMAKE_SYSTEM_NAME MATCHES "Windows" )
configure_file( LoadFile/winload.teensy load NEWLINE_STYLE UNIX )
# Default
else()
configure_file( LoadFile/load.teensy load NEWLINE_STYLE UNIX )
endif()
endif()


+ 0
- 16
Lib/CMake/modules.cmake ファイルの表示

) )
endif() endif()




###
# Setup Loader Script and Program
#

#| Provides the user with the correct teensy-loader-cli command for the built .HEX file
#| Windows
if( CMAKE_SYSTEM_NAME MATCHES "Windows" )
configure_file( LoadFile/winload load NEWLINE_STYLE UNIX )
#| Default
else()
configure_file( LoadFile/load load NEWLINE_STYLE UNIX )
endif()



+ 8
- 0
LoadFile/load.dfu ファイルの表示

#!/bin/bash

# Load via dfu-util
# Used for McHCK based uCs
dfu-util -D @TARGET_BIN@

exit $?


LoadFile/load → LoadFile/load.teensy ファイルの表示

#| Loads the hex file onto the teensy #| Loads the hex file onto the teensy
teensy-loader-cli/teensy-loader-cli -mmcu=@MCU@ -w @TARGET_HEX@ teensy-loader-cli/teensy-loader-cli -mmcu=@MCU@ -w @TARGET_HEX@


exit 0
exit $?



LoadFile/winload → LoadFile/winload.teensy ファイルの表示

#| Loads the hex file onto the teensy #| Loads the hex file onto the teensy
teensy-loader-cli/teensy-loader-cli -mmcu=@MCU@ -w @TARGET_HEX@ teensy-loader-cli/teensy-loader-cli -mmcu=@MCU@ -w @TARGET_HEX@


exit 0
exit $?