AT32F403A anyone?

Anything not related to STM32
webjorn
Posts: 43
Joined: Sat Jul 09, 2022 8:49 pm

Re: AT32F403A anyone?

Post by webjorn »

Maybe a better choice is STM32F103ZE, which has 512 kb flash, 64 kb ram.
AT32F403A has 1024 kb flash, 96 kb ram.

Even better a F4 cpu that is *compatible* on IO.

Gullik
ag123
Posts: 1655
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: AT32F403A anyone?

Post by ag123 »

well, it seemed you can get some docs from here
https://www.arterychip.com/en/product/AT32F403A.jsp

they are possibly made to 'look like' stm32, however if you review the specs and ref manuals, you would probably find differences.
for a start the clock tree setup is different from what you would find say on some of the F4xx. I'm not sure if they resemble F1xx as well.
So you'd probably need to handle them differently at least.

flash controller, dma etc could be different too
webjorn
Posts: 43
Joined: Sat Jul 09, 2022 8:49 pm

Re: AT32F403A anyone?

Post by webjorn »

Well, things are progressing... I just found out, WeAct Studios have released a board definition, located here:

https://github.com/WeActStudio/ArduinoC ... index.json

Unfortunately this does not work on Linux, so I had to revive an old laptop, and I am now in the progress of installing
the weact board. It seems some more boards/MCUs are also available.

In anticipation,

Gullik
webjorn
Posts: 43
Joined: Sat Jul 09, 2022 8:49 pm

Re: AT32F403A anyone?

Post by webjorn »

When adding a board the AT32F403ACGU7 Core Board from WeAct shows up.

However, it cannot be added, since Tool xpack-arm-none-eabi-gcc is not available for your operating system, BUT compiling OTHER boards
use exactly that compiler....buggy!!

Gullik
webjorn
Posts: 43
Joined: Sat Jul 09, 2022 8:49 pm

Re: AT32F403A anyone?

Post by webjorn »

Also, the libicicui18n.so.56 is missing in the Linux ISP programmer dist kit
webjorn
Posts: 43
Joined: Sat Jul 09, 2022 8:49 pm

Re: AT32F403A anyone?

Post by webjorn »

I found libicicui18n.so.56 and two other missing objects, and putting them in the /Artery_ISP_Console_Linux_V3.0.0/ folder
enabled activation of the DFU_download and the USART_download, so I am pretty sure I can now download and manipulate
the various security features of the chip.

webjorn@webjorn-Lenovo-G70-70:~/Artery_ISP_Console_Linux_V3.0.01$ sudo ./DFU_download.sh
------------------------------------------------------------
Artery ISP Programmer V3.0.01
Support USART and DFU
------------------------------------------------------------

DFU Connect......
Device: AT32F403ACGU7 Flash: 1024 KB
PID: 70050347 BID: 4703 Version: 3.2
Device connected Successfully

Disable access protection
Running...
Disable access protection successfully!
Disable erase and program protection
Running...

Unknown error!
webjorn@webjorn-Lenovo-G70-70:~/Artery_ISP_Console_Linux_V3.0.01$

The error probably comes from missing arguments to the programmer commandline, I need to build a .bin, and get args right.

Still: It is not possible to install the board in Arduino / Linux, since all the tools section is windows only. I need to figure out
what should go in there to enable Linux installation, more or less like "adding a new board", or wait for WeAct to update
the json file.

Gullik
webjorn
Posts: 43
Joined: Sat Jul 09, 2022 8:49 pm

Re: AT32F403A anyone?

Post by webjorn »

Modifying the json, and adding a section for X86_64_Linux and removing references to Artery_ISP_Console for which I could not find any suitable archive, and putting the json file on a local webserver, the board installs OK (as reported)

However, compiling results in the following:
fork/exec /home/webjorn/.arduino15/packages/WeAct Studio/tools/xpack-arm-none-eabi-gcc/11.2.1-1.2\bin\arm-none-eabi-g++: no such file or directory
But:
.arduino15/packages/WeAct Studio/tools/xpack-arm-none-eabi-gcc/11.2.1-1.2/bin/arm-none-eabi-g++
is present in the file system....
Note the directory spec with \ insted of /....

Change to json file below.....

"tools": [^M
{^M
"name": "xpack-arm-none-eabi-gcc",^M
"version": "11.2.1-1.2",^M
"systems": [^M
{^M
"host": "i686-mingw32",^M
"url": "https://github.com/xpack-dev-tools/arm- ... 64.zip",^M
"archiveFileName": "xpack-arm-none-eabi-gcc-11.2.1-1.2-win32-x64.zip",^M
"checksum": "SHA-256:4a45e1df1c621f0a97a2bcb63977a3745ffcff7afc0e31ad2f3d5cc1272acf4b",^M
"size": "247612940"^M
},^M
{
"host": "x86_64-pc-linux-gnu",
"url": "https://github.com/xpack-dev-tools/arm- ... x64.tar.gz",
"archiveFileName": "xpack-arm-none-eabi-gcc-11.2.1-1.2-linux-x64.tar.gz",
"checksum": "SHA-256:7479becc1ea98fbceecadf1f036ddaba8dc39c9cce5cb45f0a7a36e923d33c9a",
"size": "235243515"
}

Compiling and building uses \ as directory separators instead of /

So, edit platform.txt and boards.txt

Replacing these causes compilation success, but activating the Programmer (Artery_ISP_Console) fails, since there is none..(I removed it,
since I could not find a suitable kit for Linux)
Kenjutsu
Posts: 27
Joined: Tue Apr 07, 2020 10:58 am
Answers: 2

Re: AT32F403A anyone?

Post by Kenjutsu »

I was hoping to get this working with macOS, but with macOS the same problem occurs. xpack-arm-none-eabi-gcc is available for macOS, but not Artery_ISP_Console :(
Pieter

OSX: 11.6.8
Arduino IDE: 1.8.19
PlatformIO: 6.1.4
STM32 Core: 2.3.0
Get a $5 off coupon on your first purchase at Kaiweets
Kaiweets Affordable & Smart Electrical Testing Tools
ag123
Posts: 1655
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: AT32F403A anyone?

Post by ag123 »

does it mimic that boot0 serial (uart) programming?
if it does, maybe that is a thing to try

i tend to use this python script for that
https://pypi.org/project/stm32loader/
https://github.com/florisla/stm32loader
https://github.com/jsnyder/stm32loader
webjorn
Posts: 43
Joined: Sat Jul 09, 2022 8:49 pm

Re: AT32F403A anyone?

Post by webjorn »

Ok, now I can compile and download code. Unfortunately I seem to have destroyed the DFU uploader, and I cannot get it properly installed
with the current json.

With the above described procedure, and editing the platform.txt and boards.txt and replacing all \ with / in file paths it is now possible to compile.

Using the stand alone STM32QubeProgrammer in UART mode, I can also download code, and get it to run at possibly 240 Mhz. Next step is to build
something (dhrystone??) that will measure the actual performance.

As said, the WeAct board *can* be programmed by selecting a "Black pill STM32F103" as board, and just compiling and running, however,
speed will be max 72 Mhz, and code will be generated for a M3 core, and not for a M4F,

It does not seem WeAct use Linux, but most probably an all windows shop, since their contributed json will NOT pull in everyting as it should be.
Anyway, a step forward....

Regards,
Gullik
Post Reply

Return to “Off topic”