-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add support for AT32 chips #8752
Conversation
@@ -49,4 +49,11 @@ bool i2cBusReadRegister(const busDevice_t * dev, uint8_t reg, uint8_t * data) | |||
const bool allowRawAccess = (dev->flags & DEVFLAGS_USE_RAW_REGISTERS); | |||
return i2cRead(dev->busdev.i2c.i2cBus, dev->busdev.i2c.address, reg, 1, data, allowRawAccess); | |||
} | |||
bool i2cBusBusy(const busDevice_t *dev, bool *error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is breaking existing targets.
You can either turn this function into a macro that translate to false (better code footprint for other targets) or mark the parameters with UNUSED()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yelp ,i2cBusBusy function 's unused parm "dev“ and "error " may cause a unused param warning in my localhost , i will fix this today
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The github builds enable warnings as errors. It would save time if you could build like that locally as well.
Try running cmake -DWARNINGS_AS_ERRORS=ON and running make release to build all targets as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The github builds enable warnings as errors. It would save time if you could build like that locally as well.
Try running cmake -DWARNINGS_AS_ERRORS=ON and running make release to build all targets as well.
All warnings has been fix yesterday , and tested the STM32F411 F405 F722 and H743 , all targets 0 errors 0 warnings
I see there are lots of comments in Chinese in these commits, many also are tagged with TODO. Instead of tagging every file, I will just give the overall suggestion of keeping the code/comments in English. English is not my native language either, but it is the language used in the code and documentation. While google translate can deal with the translation fairly well, it adds friction. Remember, this is an open source project with a fairly international list of contributors. People from other backgrounds may eventually have to make changes in the code and keeping it in a single language is probably a good call. |
@shanggl
Configurator build able to flash this MCU here https://drive.google.com/file/d/1C9BsJGfIvqz2aFkYQ0daZpAjpUk06EcZ/view?usp=sharing (if someone need it) P.S. Neutronrc F435 FC are mounted on one of my quad and I can test and check all (if you need). |
522d8ef
to
2f3b63a
Compare
@erstec Can you PR the code for the configurator at the same time? @mmosca We will translate all Chinese comments into English in days. |
@DusKing1 sure, just let me back home to my main PC ) |
@erstec thks a lot
the compile warning errors has been fixed yesterday |
I don’t think it is a good idea to keep comments in both languages. Keep it simple. Duplicate comments will eventually get out of sync and cause confusion. On 2 Feb 2023, at 02:48, EMSR ***@***.***> wrote:
@shanggl commented on this pull request.
In src/main/drivers/sdcard/sdmmc_sdio.h:
@@ -215,7 +219,12 @@ typedef struct
extern SD_CardInfo_t SD_CardInfo;
extern SD_CardType_t SD_CardType;
…-bool SD_Initialize_LL(DMA_Stream_TypeDef * dmaRef);
+#ifdef AT32F43x
+// TODO:sd卡还不支持,待处理
If the hardware in question does not include sdcard slots, you may also change the comment to be
#ifdef AT32F43x #error SD card not implemented void SD_Initialize_LL (dma_channel_type *dma); #else void SD_Initialize_LL (DMA_Stream_TypeDef *dma); #endif
ok, comment in english will be added , but could i keep the chinese version in it ? i wants to use both
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
ok, comments will use english as default , |
It seems that MSC is not working |
Co-Authored-By: EMSR <10240646+shanggl@users.noreply.github.com> Co-Authored-By: carl <101383042+tcdddd@users.noreply.github.com> Co-Authored-By: Hugo Chiang <hugo@gyroflow.xyz>
Co-Authored-By: EMSR <10240646+shanggl@users.noreply.github.com> Co-Authored-By: carl <101383042+tcdddd@users.noreply.github.com> Co-Authored-By: Hugo Chiang <hugo@gyroflow.xyz>
Co-Authored-By: EMSR <10240646+shanggl@users.noreply.github.com> Co-Authored-By: carl <101383042+tcdddd@users.noreply.github.com> Co-Authored-By: Hugo Chiang <hugo@gyroflow.xyz>
Co-Authored-By: carl <101383042+tcdddd@users.noreply.github.com> Co-Authored-By: Hugo Chiang <hugo@gyroflow.xyz>
NEUTRONRCF435AIO - based on AT32F435RGT7 NEUTRONRCF435MINI - based on AT32F435CGU7 NEUTRONRCF435WING - based on AT32F435CGU7 Co-Authored-By: EMSR <10240646+shanggl@users.noreply.github.com> Co-Authored-By: carl <101383042+tcdddd@users.noreply.github.com> Co-Authored-By: Hugo Chiang <hugo@gyroflow.xyz>
8779806
to
37c417e
Compare
We've cleaned all non-English comments in the code. |
Please add support for SD Card as it helps in tuning target. |
Also noticed in latest inav 6.1.1 release, i2C1 using ports PB6, PB7 not working for AT32F435 target. Need to hack/change "drivers/bus_i2c_at32f43x.c" for i2c1 to be mux4. In the code its mux8. This allows i2C1 to function correctly on a AT32F435 target. |
This PR introduces support for AT32F435/7 chip, including the BSP lib, src code changes, cmake scripts, new at32 targets, some bug fixes, etc. The 5 commits are:
twothree NeutronRC AT32 targets submitted in 5 need this IMU drivertwothree NEUTRONRCF435 targetsWe understand the complexity of this PR, so we are willing to further split this PR according to the guidance of the inav team.
Primary credit to @tcdddd , also thanks to my flightng team colleagues: @shanggl, @pdwdw and NT.JIA.
-- Chinese version --
本PR引入了对AT32F435/7芯片的支持,包括BSP,src代码,cmake脚本,AT32飞控目标添加,部分bug修复等。5条commits的具体内容为:
两个三个新目标使用该IMU两个三个NEUTRONRCF435目标我们理解该PR的复杂性,所以我们愿意根据INAV团队的指导对该PR进行进一步拆分。
首要致敬 @tcdddd ,同时还要感谢flightng团队的同事们:@shanggl、@pdwdw以及NT.JIA。