-
Notifications
You must be signed in to change notification settings - Fork 218
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
Adding BOOTLOADER option to support Robotis bootloader different ROM #89
Conversation
I've also wrote a python loader for Robotis: In our environment, we've also changed the "make install" regarding the bootloader option, adding the loader script in support/. This allows to "make install" directly on the board of robotis without changing the bootloader. However, we've introduced BOOTLOADER_PORT in our makefile because we can't detect it automatically |
Cool, I'll definitely review this ASAP. In the meantime, can you please add a sign-off line to your commit and force-push into this same branch, as described in the HACKING file? |
OK, and should I add the "make install" hack to use my loader to flash robotis-based boards? |
Signed-off-by: Grégoire Passault <g.passault@gmail.com>
Signed-off-by: Grégoire Passault <g.passault@gmail.com>
I've also added the loader script and changed the hook for the robotis case Now, if I do:
I'm flashing the board, keeping the compatibility with original robotis IDE |
Summary of this PR changes:
|
You know, I'd honestly prefer to do this in a less special-cased way, but I'm going to go ahead and merge it, since you're the first third party in a long time to add support for their boards to libmaple, and it's nice to see an old project still getting some love ;). A lot of the special-casing going on here is due to implementation choices we made before we had to support boards other than our own, or boards with non-default bootloader settings, anyway, by the looks of things. If another pull request comes in which adds even more special cases, though, I'll probably refuse it until the more generic changes I propose in the rest of this comment are made, though. Feel free to do these cleanups yourself and send another PR (that would be super awesome): Cleanup 1It would be better for each board file in support/make/board-includes files to specify the RAM/ROM base offsets numerically, based on the current MEMORY_TARGET. For example, if MEMORY_TARGET was "flash", maple.mk would set some new variables like so:
Your board files would be similar, except with smaller xxx_ORIGIN and correspondingly larger xxx_LENGTH. Once that's done, we could replace all of the crap in support/ld/stm32/mem by autogenerating the .inc file in the build/ directory based on the These variables would also let us eliminate the per-board special casing of USER_ADDR_RAM and USER_ADDR_ROM in wirish/boards.cpp, which definitely won't scale if more boards get added with still different bootloader offsets. Cleanup 2I'm really not a fan of all the per-board special casing going on in wirish/usb-serial.cpp (though it's definitely our fault for sticking our board-specific stuff there in the first place). The non-common bits of functionality should get ripped out and replaced with weak definitions that can be overridden in wirish/boards/BOARDNAME/board.cpp. |
Adding BOOTLOADER option to support Robotis bootloader different ROM
Cleanup 3All the special-casing in the top-level makefile should also get replaced with hooks drawn from support/make/board-includes. |
I agree, it would be nice to do those cleanups One more cleanup: I think that the "BOOTLOADER ?= ..." should also be contained in the board include files, the default bootloader for For Why do you call it "old project", Maple & Maple mini are still in production and available in a lot of stores Moreover, ROBOTIS based OpenCM on the libmaple (guess you're aware: https://github.com/robotis-pandora/ROBOTIS-OpenCM/tree/master/OpenCM_ide/processing-head/hardware/robotis/cores/robotis), this board is in production and is likely to be really more used when their new servos will be on the market. libmaple is really handy and clean, we're using it in some robotics project. |
I agree about the BOOTLOADER cleanup. When I say "old project", I mean we don't have the developer resources to actively move the platform forward as quickly as we once did. I love libmaple and think it's how MCU libraries should be done, even if I do say so myself ;). Thank you very much for the kind words, and I look forward to seeing Robotis succeed. On April 30, 2014 1:28:40 AM PDT, "Grégoire Passault" notifications@github.com wrote:
|
This introduces a
BOOTLOADER
option in the Makefile, allowing to specify the bootloader that will be usedThis is because the robotis bootloader starts for instance the program at 0x8003000 instead of 0x8005000