File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ node_modules
2+ package-lock.json
3+ uhk-bootloader- * .hex
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env node
2+ const fs = require ( 'fs' ) ;
3+ require ( 'shelljs/global' ) ;
4+
5+ config . fatal = true ;
6+ config . verbose = true ;
7+
8+ const bootloaderHex = `${ __dirname } /../targets/MK22F51212/kds/freedom_bootloader/release/freedom_bootloader.hex` ;
9+ const targetConfigH = `${ __dirname } /../targets/MK22F51212/src/target_config.h`
10+ const targetConfigHContent = fs . readFileSync ( targetConfigH , 'utf8' ) ;
11+
12+ const majorNumber = targetConfigHContent . match ( / k T a r g e t _ V e r s i o n _ M a j o r = ( [ 0 - 9 ] + ) / ) [ 1 ] ;
13+ const minorNumber = targetConfigHContent . match ( / k T a r g e t _ V e r s i o n _ M i n o r = ( [ 0 - 9 ] + ) / ) [ 1 ] ;
14+ const patchNumber = targetConfigHContent . match ( / k T a r g e t _ V e r s i o n _ B u g f i x = ( [ 0 - 9 ] + ) / ) [ 1 ] ;
15+
16+ rm ( '-f' , bootloaderHex ) ;
17+
18+ exec ( `/opt/Freescale/KDS_v3/eclipse/kinetis-design-studio \
19+ --launcher.suppressErrors \
20+ -noSplash \
21+ -application org.eclipse.cdt.managedbuilder.core.headlessbuild \
22+ -import ${ __dirname } /../targets/MK22F51212/kds/freedom_bootloader \
23+ -cleanBuild freedom_bootloader`
24+ ) ;
25+
26+ cp ( bootloaderHex , `uhk-bootloader-${ majorNumber } .${ minorNumber } .${ patchNumber } .hex` ) ;
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " uhk-bootloader" ,
3+ "homepage" : " https://UltimateHackingKeyboard.com" ,
4+ "description" : " The bootloader of the Ultimate Hacking Keyboard" ,
5+ "repository" : {
6+ "type" : " git" ,
7+ "url" : " git+ssh://git@github.com/UltimateHackingKeyboard/bootloader.git"
8+ },
9+ "author" : " Ultimate Gadget Laboratories" ,
10+ "license" : " GPL-3.0" ,
11+ "bugs" : {
12+ "url" : " https://github.com/UltimateHackingKeyboard/bootloader/issues"
13+ },
14+ "dependencies" : {
15+ "shelljs" : " ^0.7.8"
16+ }
17+ }
You can’t perform that action at this time.
0 commit comments