-
Notifications
You must be signed in to change notification settings - Fork 408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
building in platform.io #43
Comments
I did just about the same thing a couple of weeks ago, and managed to compile. The binary is way smaller, so I haven't dared flashing it. |
hi lars, |
I have some trouble getting platform.io up and running
Also I hade do change your build options to linux compatible paths, but for now i'm stuck. make still works. |
I did find platform.io had chosen the wrong CPU for me, -DSTM32F103xE works for me now on GD32 cpu. |
ok, pushed a new 'sensorcontrol' branch, and did a pull request against this repo. |
added a commit with case changes and included your changes to bldc.c - now it's compiling. Created pull requests #59 |
i just download file, and try compile in windows 10 using platform io in visual code IDE but not succses compile and error,,,
im new in arm world... thanks for help |
Which branch/commit did you try? |
i using it : https://github.com/btsimonh/hoverboard-firmware-hack/tree/Platform.io my main bord chip is GD32f103RC should i change board = genericSTM32F103RC in platformio.ini? |
do you have the STM32F103RCTx_FLASH.ld in the root of the repo? |
thanks for your guidance.....
yeahhh,,,,its work well ....compile withoute error ,
but not testing yet to the board.. |
ok, it builds for me. but. To have PlatformIO recognise it properly, I had to: |
today i just try again to compile from your source : https://github.com/btsimonh/hoverboard-firmware-hack.git
And i use some methode to compile from this source : https://github.com/p-h-a-i-l/hoverboard-firmware-hack/tree/pio its compile without error :
Thanks all for your guidance 👍 |
Away at the moment, but for my repo, make sure you are on the pidcontrol branch....
On Sep 21, 2018 5:00 AM, zsocietyGithub <[email protected]> wrote:
ok, it builds for me. but. To have PlatformIO recognise it properly, I had to:
1/ ensure you add the specific folder which contains the platformio.ini file to the workspace.
2/ does not like to be added to another workspace which does not already have platformio folders in it? (e.g. added to a php workspace, platformio did not add to the bottom of vscode the build options.)
3/ it adds some josn files in .vscode.
4/ I do get: 'Warning! Cannot find a linker script for the required board! Firmware will be linked with a default linker script!', but it builds. And I THINK the line '-Wl,-T${PROJECT_DIR}/STM32F103RCTx_FLASH.ld' overrides the platformio chosen script anyway... (I have some special source in mine, and it works).
5/ Maybe try saving workspace to your project folder....
today i just try again to compile from your source : https://github.com/btsimonh/hoverboard-firmware-hack.git<url>
my step is (correct me if i use wrong methode) : download zip file -> extract file hoverboard-firmware-hack-Platform.io ->open folder from VS code -> compile with platfom.io -> file not compile and get error :
Verbose mode can be enabled via -v, --verbose option
PLATFORM: ST STM32 > STM32F103RC (48k RAM. 256k Flash)
SYSTEM: STM32F103RCT6 72MHz 48KB RAM (256KB Flash)
DEBUG: CURRENT(blackmagic) EXTERNAL(blackmagic, jlink, stlink)
Warning! Cannot find a linker script for the required board! Firmware will be linked with a
default linker script!
Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF MODES: FINDER(chain) COMPATIBILITY(soft)
Collected 2 compatible libraries
Scanning dependencies...
No dependencies
Linking .pioenvs\genericSTM32F103RC\firmware.elf
.pioenvs\genericSTM32F103RC\src\bldc.o: In function DMA1_Channel1_IRQHandler': bldc.c:(.text.DMA1_Channel1_IRQHandler+0x250): undefined reference toblockPhaseCurrent'
bldc.c:(.text.DMA1_Channel1_IRQHandler+0x2a2): undefined reference to blockPWM' bldc.c:(.text.DMA1_Channel1_IRQHandler+0x2b2): undefined reference toblockPWM'
bldc.c:(.text.DMA1_Channel1_IRQHandler+0x2d8): undefined reference to blockPWM' bldc.c:(.text.DMA1_Channel1_IRQHandler+0x31a): undefined reference toblockPWM'
collect2.exe: error: ld returned 1 exit status
*** [.pioenvs\genericSTM32F103RC\firmware.elf] Error 1
================================ [ERROR] Took 3.75 seconds ================================
And i use some methode to compile from this source : https://github.com/p-h-a-i-l/hoverboard-firmware-hack/tree/pio<url>
its compile without error :
Verbose mode can be enabled via -v, --verbose option
PLATFORM: ST STM32 > STM32F103RC (48k RAM. 256k Flash)
SYSTEM: STM32F103RCT6 72MHz 48KB RAM (256KB Flash)
DEBUG: CURRENT(blackmagic) EXTERNAL(blackmagic, jlink, stlink)
Warning! Cannot find a linker script for the required board! Firmware will be linked with a default linker script!
Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF MODES: FINDER(chain) COMPATIBILITY(soft)
Collected 2 compatible libraries
Scanning dependencies...
No dependencies
Checking size .pioenvs\genericSTM32F103RC\firmware.elf
Memory Usage -> http://bit.ly/pio-memory-usage
DATA: [ ] 3.9% (used 1932 bytes from 49152 bytes)
PROGRAM: [= ] 7.0% (used 18328 bytes from 262144 bytes)
Thanks all for your guidance 👍
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#43 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AC_fNAVq5HMUSPeQU1oErjGjypYqKnAcks5udEgngaJpZM4V5JpC>.
|
Note new pull request by @p-h-a-i-l : |
Hi All,
I've just spent a couple of hours getting this to build in Platform.io. It now produces a .bin and .elf file
The modifications are here:
https://github.com/btsimonh/hoverboard-firmware-hack/tree/platformio
The output has not been tested on a board yet (I will be a week or so of analysis of existing serial first, then modify for GM32 CPU), so I won't issue a pull request until I'm more sure it will work.
The .bin file does seem a little larger than the original (~33k, compared to the hex file of ~33k, so about double the size?)
There is one code change, described in the readme.md in the platformio folder.
If someone wants to try it, and confirm, I have included a .bin file.
The text was updated successfully, but these errors were encountered: