-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sebastian Lehmann
committed
Sep 28, 2020
1 parent
b6fea8c
commit d99949b
Showing
19 changed files
with
599 additions
and
525 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
usbtest/usbtest | ||
.idea/ | ||
stRttLogger/stRttLogger |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// Copyright 2020 Sebastian Lehmann. All rights reserved. | ||
// Use of this source code is governed by a GNU-style | ||
// license that can be found in the LICENSE file. | ||
|
||
// this code is mainly inspired and based on the openocd project source code | ||
// for detailed information see | ||
|
||
// https://sourceforge.net/p/openocd/code | ||
|
||
package gostlink | ||
|
||
type StmCpuInfo struct { | ||
RamStart uint64 | ||
RamSize uint64 | ||
} | ||
|
||
var supportedStmCpus = map[string]StmCpuInfo{ | ||
"STM32F030F4": {0x20000000, 0x1000}, | ||
"STM32F030K6": {0x20000000, 0x1000}, | ||
"STM32F030C6": {0x20000000, 0x1000}, | ||
"STM32F030C8": {0x20000000, 0x2000}, | ||
"STM32F030R8": {0x20000000, 0x2000}, | ||
"STM32F030CC": {0x20000000, 0x8000}, | ||
"STM32F030RC": {0x20000000, 0x8000}, | ||
"STM32F070F6": {0x20000000, 0x2000}, | ||
"STM32F070C6": {0x20000000, 0x2000}, | ||
"STM32F070CB": {0x20000000, 0x4000}, | ||
"STM32F070RB": {0x20000000, 0x4000}, | ||
} | ||
|
||
func GetCpuInformation(cpuId string) *StmCpuInfo { | ||
if val, ok := supportedStmCpus[cpuId]; ok { | ||
return &val | ||
} else { | ||
return nil | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.