2754 views|7 replies

5213

Posts

239

Resources
The OP
 

I would like to ask forum friends to share: How to change the routines under IAR and Keil into sample projects of GCC compiler? [Copy link]

 

Today, an engineer from the forum posted on WeChat:

Can the technicians at National Technology help me with a sample project based on the GCC compiler? Their official demo only has IAR and KEIL

I didn’t quite understand what I was thinking: “Is this netizen lazy?” So I asked:

The netizens were wronged. I quickly forwarded it to the manufacturer and decided to post a thread on the forum to see if there are any netizens who know about it and can give me some advice.

Then before I finished posting, I received the GCC sample package from National Technology . It was just now. The epidemic has not affected the speed of Shenzhen even though I work from home. Haha

I will share it in this section later.

However, I still want to ask, if the manufacturer does not provide a demo under the GCC environment, what do you usually do?

This post is from Domestic Chip Exchange
Add and join groups EEWorld service account EEWorld subscription account Automotive development circle

Latest reply

stm32cubex generates one and follows the modification, hahaha.   Details Published on 2022-3-22 14:05
 
 

5213

Posts

239

Resources
2
 

Share the data package provided by National Technology
National Technology: N32G45x_Library.1.3.0_for_gcc and the documentation for using the GCC development environment under Windows https://en.eeworld.com/bbs/thread-1196999-1-1.html

This post is from Domestic Chip Exchange
Add and join groups EEWorld service account EEWorld subscription account Automotive development circle
 
 
 

1370

Posts

2

Resources
3
 

Do it yourself, hahaha.

I have done this a lot.

This post is from Domestic Chip Exchange

Comments

nmg
Can you elaborate on this? For example, if he wants to do it himself, what should he learn and understand first? Is there any reference material that this netizen can learn from?  Details Published on 2022-3-21 10:30
 
 
 

7422

Posts

2

Resources
4
 

ARM's cmsis has compiler porting files... Then it's just the usual practice.

This post is from Domestic Chip Exchange

Comments

nmg
Does it mean that it can be directly converted to compile under the gcc compiler? I don't quite understand, so I'll share it with that netizen first.  Details Published on 2022-3-21 10:31
Personal signature

默认摸鱼,再摸鱼。2022、9、28

 
 
 

5213

Posts

239

Resources
5
 
cruelfox posted on 2022-3-18 18:52 Do it yourself, hahaha. I have done this many times.

The hero is here, can you tell me more about this?

For example, if he wants to do it himself, what aspects should he understand and learn first?

Is there any reference material that this netizen can refer to?

This post is from Domestic Chip Exchange
Add and join groups EEWorld service account EEWorld subscription account Automotive development circle
 
 
 

5213

Posts

239

Resources
6
 
freebsder posted on 2022-3-18 21:42 ARM's cmsis has the compiler porting file. . . Then it's the usual practice.

Does it mean that it can be directly converted to compile under the gcc compiler? I don't quite understand, so I'll share it with that netizen first.

This post is from Domestic Chip Exchange
Add and join groups EEWorld service account EEWorld subscription account Automotive development circle

Comments

stm32cubex generates one and follows the modification, hahaha.  Details Published on 2022-3-22 14:05
 
 
 

1370

Posts

2

Resources
7
 
nmg Published on 2022-3-21 10:30 The hero is here. Can you tell me more about this? For example, if he wants to do it himself, what aspects should he understand and learn first? Is there any...

The key point is whether the MCU manufacturer provides header files that support GCC, that is, those containing register definitions, because different compilers have some special definitions that are different. If there is no GCC-specific header file, you have to try the existing one to see if it needs to be modified.

Then see if you need to use binary libraries, that is, library files without source code. For example, many BLE libraries do not provide source code. If there is no corresponding version of GCC, these supports cannot be used.

The basic GCC compilation requires the following files provided by the manufacturer: header files, linker scripts (files with the suffix .ld), and C startup files (startup_xxx, etc., which may be assembly or written in C). The header files are the most important. If you don't have them, you have to use other compiler versions. If you don't have linker scripts, you can rewrite them yourself using other MCU models. It's not difficult if you understand them. The startup files mainly include the interrupt vector table and the default interrupt ISR. If you don't have them, you can modify them accordingly.

After you have the basics, you can write a simple program to test it.

Hint: Many domestic MCUs are imitations of STM32. If the register definitions are similar, you can even use the stm32 file directly.

To port an example from IAR or Keil to GCC, you need to dig out the list of files you need from the project file. The project file is in text format, so it's easy to find.

This post is from Domestic Chip Exchange
 
 
 

7422

Posts

2

Resources
8
 
nmg posted on 2022-3-21 10:31 Does it mean that it can be directly converted to compile under the gcc compiler? I don't quite understand, so I'll share it with that netizen first

stm32cubex generates one and follows the modification, hahaha.

This post is from Domestic Chip Exchange
Personal signature

默认摸鱼,再摸鱼。2022、9、28

 
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list