Устранить пересечение образа логгера с параметрами EEPROM и проверять размер BIN
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
param(
|
||||
[string]$TemplatesRoot = "$PSScriptRoot/../newProject/SETGUI/third_party/templates",
|
||||
[string]$CompilerRoot = 'C:/ti/ccs1230/ccs/tools/compiler/ti-cgt-c2000_22.6.0.LTS'
|
||||
[string]$CompilerRoot = 'C:/ti/ccs1230/ccs/tools/compiler/ti-cgt-c2000_22.6.0.LTS',
|
||||
[string]$OutputDirectory = "$PSScriptRoot/Bin/LoggerEepromFix"
|
||||
)
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$protocol = Join-Path (Resolve-Path -LiteralPath $TemplatesRoot).Path 'c/set-protocol'
|
||||
@@ -9,15 +10,16 @@ foreach ($required in @('src/ump_protocol.c', 'ports/tms320f28335/ump_tms28335.c
|
||||
throw "Missing $required in $protocol. Use templates with the UMP v3 port."
|
||||
}
|
||||
}
|
||||
$output = Join-Path $PSScriptRoot 'Bin/LoggerFix'
|
||||
$output = $OutputDirectory
|
||||
$objects = Join-Path $output 'obj'
|
||||
New-Item -ItemType Directory -Force -Path $objects | Out-Null
|
||||
$includes = @('Source/Internal/Include', 'Source/External/v120/DSP2833x_headers/include',
|
||||
'Source/External/v120/DSP2833x_common/include') | ForEach-Object { "--include_path=$PSScriptRoot/$_" }
|
||||
$includes += @("--include_path=$CompilerRoot/include", "--include_path=$protocol",
|
||||
"--include_path=$protocol/ports/tms320f28335")
|
||||
$flags = @('-v28', '-ml', '-mt', '--float_support=fpu32', '-O3', '--define=LARGE_MODEL',
|
||||
'--abi=coffabi', '--disable_dp_load_opt', '--opt_for_speed=0', '--gen_func_subsections=on')
|
||||
# Match the CCS Debug configuration used for 34a95bc5.
|
||||
$flags = @('-v28', '-ml', '-mt', '--float_support=fpu32', '-O1', '--define=LARGE_MODEL',
|
||||
'--define=_DEBUG', '--symdebug:dwarf', '--abi=coffabi', '--opt_for_speed=3')
|
||||
$external = @('DSP2833x_ADC_cal.asm', 'DSP2833x_Adc.c', 'DSP2833x_CpuTimers.c',
|
||||
'DSP2833x_PieCtrl.c', 'DSP2833x_SWPrioritizedDefaultIsr.c', 'DSP2833x_SWPrioritizedPieVect.c',
|
||||
'DSP2833x_SysCtrl.c', 'DSP2833x_Xintf.c', 'DSP2833x_usDelay.asm')
|
||||
@@ -30,13 +32,14 @@ foreach ($source in $sources) {
|
||||
if ($LASTEXITCODE -ne 0) { throw "Compilation failed: $source" }
|
||||
$objectFiles += Join-Path $objects ([IO.Path]::GetFileNameWithoutExtension($source) + '.obj')
|
||||
}
|
||||
$name = 'UKSSTMS320F28335_logger_fix'
|
||||
$name = 'UKSSTMS320F28335_logger_eeprom_fix'
|
||||
& "$CompilerRoot/bin/cl2000.exe" @flags -z "--map_file=$output/$name.map" --stack_size=0x3f0 --warn_sections `
|
||||
"--search_path=$CompilerRoot/lib" --reread_libs --entry_point=_c_int00 --rom_model `
|
||||
"--output_file=$output/$name.out" @objectFiles "$PSScriptRoot/F28335.cmd" `
|
||||
"$PSScriptRoot/Source/External/v120/DSP2833x_headers/cmd/DSP2833x_Headers_nonBIOS.cmd" `
|
||||
"$PSScriptRoot/Libraries/rts2800_fpu32.lib"
|
||||
if ($LASTEXITCODE -ne 0) { throw 'Link failed' }
|
||||
& "$CompilerRoot/bin/hex2000.exe" "$output/$name.out" -boot -sci8 -map "$output/${name}_hex.map" -o "$output/$name.bin" -b
|
||||
& "$CompilerRoot/bin/hex2000.exe" "$output/$name.out" -boot -sci8 -map "$output/${name}_hex.map" -o "$output/$name.bin.pending" -b
|
||||
if ($LASTEXITCODE -ne 0) { throw 'Binary conversion failed' }
|
||||
& "$PSScriptRoot/check_firmware.ps1" -Path "$output/$name.bin.pending" -PublishPath "$output/$name.bin"
|
||||
Write-Output "Firmware: $output/$name.bin"
|
||||
|
||||
Reference in New Issue
Block a user