Comments (12)
Hi. I have absolutely no experience with IAR, but according to short googling, it might be that IAR does not like the label "1" which is used in the assembly.
if you try to replace the lines
"1: subs r0, #1 \n\t"
" bhi 1b \n\t"
with
"loop: subs r0, #1 \n\t"
" bhi loop \n\t"
it might work. At least it compiles with GCC. Unfortunately I have no hardware in my hands right now to test the change. But could you check if this helps?
from bldc-drive.
I think that I need to instal Eclipse :-(
Error[Og006]: Error in inline assembly: "Error[54]: Expression can not be forward"
Error[Og006]: Error in inline assembly: "Error[54]: Expression can not be forward"
from bldc-drive.
Ok, it really seems that IAR handles the asm() keyword differently to GCC. :( I'll try to find a way to implement the delay_ms in a better way without using assembly. I think the SysTick is the right way to go, I just need to learn how to use it.
from bldc-drive.
I pushed a new version of utils.c. It is now implemented with systick and no assembly. You can try that. I'm afraid this is not the only problem with IAR though, but let's see?
from bldc-drive.
inline uint32_t millis (void)
{
return ticks; //ERROR
}
Error[Pe1031]: an entity with internal linkage cannot be referenced within an inline function with external linkage
from bldc-drive.
Crap.. This is quite difficult as I cannot test it with IAR. :) It seems to do something with inline support on IAR. I have no clue if the inline declaration is even useful there, I followed an example on web on implementing the Systick delay quickly. You can try it out by simply removing the inline keyword..
from bldc-drive.
Nop a tried that and i get 101 Errors. IAR gives me headache.
from bldc-drive.
Right.. I doubt it is the IAR that is causing the problem, it's just my lacking skill in software, the code is something that barely compiles in GCC with luck. :) Sadly I don't have a Windows computer to try with, it seems that there would be a trial version of IAR EWARM available..
from bldc-drive.
If You whant to install the trial version I can provide the activator serial for full
from bldc-drive.
I installed the IAR on my girlfriends laptop and I think I made this compile now! (5 warnings are left) I had some serious stupidness on the header files, I'm surprised that GCC is so forgiving that it compiled this. I had some trouble with ST-Link on Windows, so I haven't tried the IAR image on hardware, but at least it compiles.
from bldc-drive.
Hmm.. After getting the ST-Link to work, I have to say that this is more complicated than I thought. Now I am able to somehow start to run and debug the program, but as soon as first interrupt fires, I get a HardFault. And as I understand it, there is now something mixed with the startup code provided by IAR and the startup code included in my project. I am sorry to say, but I don't think I have enough interest to learn enough about IAR and it's proprietary startup code to really make this work.. :(
from bldc-drive.
Watch out for the optimizations level under Project-> Options->C/C++ Compiler->Optimizations it has to be set to None
Then you have to write the path to the included files of your files not IAR in Project-> Options->C/C++ Compiler->Preprocessor->Additional include directories(one per line)
\src
\include
\system\include\cmsis
\system\include\stm32f1-stdperiph
And try to write USE_STDPERIPH_DRIVER
Project-> Options->C/C++ Compiler->Preprocessor->Defined symbols(one per line)
Make sure you select ST STM32F103C8 under Project-> Options->General Options->Target->Device
from bldc-drive.
Related Issues (15)
- PID error of the project HOT 8
- Missing Binaries HOT 3
- BOM HOT 2
- NOOB guide /Help HOT 26
- DC brushed motor version HOT 2
- please tell me what does encoder_poles mean HOT 2
- > Hi. You are correct, it refers to the number of pole pairs in the motors. The name seems to be stupid.. :) HOT 1
- It posible for pmsm servo 220v 5A???
- STM32 PMSM FOC Software Development Kit - MC library HOT 1
- Dead time HOT 3
- some kind of TestMode missing HOT 1
- schematic&layout HOT 2
- port source code to STM32F407 please.. HOT 1
- Newbie hint request HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bldc-drive.