AlkaMotors / f051bldc

brushless motor control stm32f051
66 stars 24 forks source link

help compile source #7

Open jonathan2018 opened 4 years ago

jonathan2018 commented 4 years ago

hi conuthead

thank you for your project . i very like it , but i do not know how to compile source to hex , can you help me ?

AlkaMotors commented 4 years ago

woah, its been a long time since i have updated this.. i am sorry, you are long gone but.. I have changed to working with cubemx IDE as of jan 2020. The project can be imported into that and compiled.

abrarakram19 commented 4 years ago

Good work bro, keep it up, i will also try to compile and try on some hardware.

abrarakram19 commented 4 years ago

Bro, i am very much excited about this super esc firmware, and pray for it's wonderful success, and waiting anxiously for some more instructions about hardware configuration and some compiled hex files.

AlkaMotors commented 4 years ago

Hi abrarakram19 , thanks for your support, This firmware only works on my hardware for the stuff on my blog at rcgroups , https://www.rcgroups.com/forums/member.php?u=696658 the moment but if you have a commercial esc maybe take a look at this fork as he supports more targets .. https://github.com/3x8/nostromo

abrarakram19 commented 4 years ago

Thanks for the links, I was digging in your code for pinout and was not getting much clearer understanding because I am not specialised in coding but still trying to learn programming. I am a hobbyist and can design a good PCB and was trying to make my own pcb design compatible with your firmware with high current capabilities upto 200A for RC cars. I already learned an other open firmware Simonk and BlHeli for Atmega8 mcu and Silabs, designed pcbs for them and assembled for testing and succeeded. Then I decided to learn and make Blheli_32 esc, when I designed pcb (pinout copied from a commercial esc) and when I tried to flash that then I realised its not open source and I don't have bootloader and only pre compiled hex files i can't flash on a blank stm32f051, and this mystery brought me to your project. And now I am very happy, at least i will try 32bit esc to make. Thanks again for useful links and wishing you success.

AlkaMotors commented 4 years ago

@abrarakram19 I will definitely help you get firmware working on your board, I don't really try to support commercial esc's but will make sure you have something that works on your hardware. The current firmware works very well right now ! . What esc did you copy the pinout of? the pinout of my esc and firmware matches the wraith_32.

abrarakram19 commented 4 years ago

Update, wow brother i was confusing pin numbers with specific port assigned numbers. My goodness I seen its same pinout as Wraith32, DYS and furling. Thanks to your project and support links i finally got everything I needed. Update: flashed via St Link V2 programmer and St. link utility through SWD interface, on power start up tone play leds working with only DYS35ARIAS code but no response with throttle, motor seems in braking mode because by rotating with hand it is little jam. And mosfets get hot slowly. Don't know what's wrong.

AlkaMotors commented 4 years ago

Which firmware did you flash?

AlkaMotors commented 4 years ago

The mosfet pinouts are the same for the wraith and the dys but the comparators inputs are not so the firmware is not interchangeable between the two targets.

abrarakram19 commented 4 years ago

Bro, I flashed dys, furling and Wraith one by one all having same pinouts, startup tone playing only, with all models but no further response. Can you give me some hints to try some changes in main.c file and little guidance about compilation to get .bin file, just give me some basic road map where to start because there are many files and folder with same names. Can I try some changes in your code. I have cube IDE&MX. Is that possible to make some changes in only main.c file or need to b modify in many other files. However comp. Mask GPIO Pin number are matching with above codes. Any guidance or relevant links are appreciated. I flashed nostromo's already compiled .Bin files, V1.9.3 And also implement brushed motor control in your firmware. Thanks a lot.

AlkaMotors commented 4 years ago

I have never tried the nostromo firmware myself. I just though it might have had a target that would match your hardware. The only functions that would need changing in my firmware in main.c would be changeCompInput() , and the driver output or phaseXPWM(), phaseXFLOAT() and phaseXLOW() for A, B and C phase. I can take a look if you have a schematic and choose the right order.

abrarakram19 commented 4 years ago

I also compiled your code and seleted fd6288 in main.c but no luck. I am doubtful about 6288 may be it's faulty tomorrow i will try after replacement. I have read your code even though I am beginner in coding but I felt you code is far more superior in terms of features, keep it up definitely it will be a very good firmware.

AlkaMotors commented 4 years ago

The fd6288 option will not be the right code for yours! It does not match the pinout of the wraith32. The version that does is the mp6531 version. Those defines were made because I use different gate drivers on different hardware and also different pinouts.

abrarakram19 commented 4 years ago

If mp6531 is defined will it work on boards having fd6288? And another thing I read somewhere in code stm32f051k6 is defined but my board has f051k8 does it matter?

AlkaMotors commented 4 years ago

Yes, ignore the fact that it is called mp6531, its just for myself, the firmware itself doesn't care what the driver is. About the k8 There is a section of flash devoted to eeprom in the firmware so i am not sure if it would work as is or if you would need to change some memory addresses for eeprom storage and the .ld file.