Clawson: Sorry that I didn't explain myself clearly enough, here's a link: https://garynuman.com/
As for the other stuff... I do not want to drop into a command line compiler, build, import, etc. I just want to use studio to do everything 'in the project structure' do you understand what I mean by that?
As I said in the first post (in a galaxy long ago...) all I want to do is add a handful of assembler instructions into my project.
void SomeCfunction(void)
/** DOXYGEN stuff>>>
{ Kill Interrupts
ASM
// read an I/O line
// wait for I/O line to go high
// set another I/O line
// wait 10 clocks (@12MHz)
// set another I/O line
// clear 1st I/O line
/ASM
Interrupts enable
}
Who would have thought that this wasn't an incredibly straight forward thing to do? Would you rather be happy or right?
That's the sync function... then there will be a 2nd function to update the WS2812B... Oh god help me!
<º))))><
I am only one lab accident away from becoming a super villain.
Still no idea what it is you are trying to achieve or what is not easy about it. Because of Linux, GCC must surely be the most widely used C/C++ compiler in the world so it's not like there isn't a wealth of info about how to use it readily available.
Because of Linux, GCC must surely be the most widely used C/C++ compiler in the world so it's not like there isn't a wealth of info about how to use it readily available
Doxygen is also very widely used - I would think there's quite a good chance that someone has published a way to use it with Assembler source ... ?
Yes, Doxygen can work on ASM files, it just 'screws up' the format/information a bit compared to C files.
clawson: I am sorry, but I do not know how to explain what I am trying to achieve any clearer to you in a short post, but thank you for your time/effort.
I just need some time to work through the errors and debug them. Hopefully I'll get back on the code later this week, ah well, stranger things have happened?
I work as a design consultant so software is just a tiny part of my work, maybe I should be happy that at my level it is still ANY part of my job? :)
<º))))><
I am only one lab accident away from becoming a super villain.
Well some great news, it's all working :) I came back to work last night after gym for a blissful hour with no distractions!
1) I created an ASM file (.S) :
#define __SFR_OFFSET 0
#include <avr/io.h>
.global WS2812Bdriver
WS2812Bdriver:
(perfectly presentable assembler code)>>
ret
2) A header file for the LED routines (.h)
void WS2812Bupdate(void);
3) A file containing the 'C' code
void WS2812Bupdate(void)
{ WS2812Bdriver(LEDbuffer, sizeof(LEDbuffer));
return;
}
Then in 'main' I just call:
WS2812Bupdate();
I do know that I do not need to make the function and I could call the ASM from 'main' directly, but by doing it this way Doxygen works much 'better' :) (or rather does what I want)
I had to write ASM for the low level control of the WS2812Bs as the MPU runs at 16MHz, but it was excellent to have the 8MHz example, thanks so much for that help.
It is up and running and I have a strip of >100 LEDs lighting up and giving me little dots in my vision! I'm really impressed by them, the colours are intense and they are so bright (this is the cause of my little dots!).
This is going to seem like magic to the company, currently they have so many problems with LEDs not meeting the required colours. They have been trying different brands and batches. Also changing resistors on the PCBs! I just need to link a couple of commands into the debug port and we can tweak them remotely, excellent.
<º))))><
I am only one lab accident away from becoming a super villain.
Clawson: Sorry that I didn't explain myself clearly enough, here's a link: https://garynuman.com/
As for the other stuff... I do not want to drop into a command line compiler, build, import, etc. I just want to use studio to do everything 'in the project structure' do you understand what I mean by that?
As I said in the first post (in a galaxy long ago...) all I want to do is add a handful of assembler instructions into my project.
void SomeCfunction(void)
/** DOXYGEN stuff>>>
{ Kill Interrupts
ASM
// read an I/O line
// wait for I/O line to go high
// set another I/O line
// wait 10 clocks (@12MHz)
// set another I/O line
// clear 1st I/O line
/ASM
Interrupts enable
}
Who would have thought that this wasn't an incredibly straight forward thing to do? Would you rather be happy or right?
That's the sync function... then there will be a 2nd function to update the WS2812B... Oh god help me!
<º))))><
I am only one lab accident away from becoming a super villain.
- Log in or register to post comments
TopStill no idea what it is you are trying to achieve or what is not easy about it. Because of Linux, GCC must surely be the most widely used C/C++ compiler in the world so it's not like there isn't a wealth of info about how to use it readily available.
- Log in or register to post comments
TopAs noted in #2, Atmel studio (being based on MS Visual Studio) has no problem with mixed-language projects.
Top hit for just googling, "atmel studio mix assembler":
Go on, then - what errors, exactly?
Top Tips:
- Log in or register to post comments
TopDoxygen is also very widely used - I would think there's quite a good chance that someone has published a way to use it with Assembler source ... ?
Top Tips:
- Log in or register to post comments
Topawneil: Thank you for the link.
Yes, Doxygen can work on ASM files, it just 'screws up' the format/information a bit compared to C files.
clawson: I am sorry, but I do not know how to explain what I am trying to achieve any clearer to you in a short post, but thank you for your time/effort.
I just need some time to work through the errors and debug them. Hopefully I'll get back on the code later this week, ah well, stranger things have happened?
I work as a design consultant so software is just a tiny part of my work, maybe I should be happy that at my level it is still ANY part of my job? :)
<º))))><
I am only one lab accident away from becoming a super villain.
- Log in or register to post comments
Topor maybe you should find a development consultant to help you ... ?
Top Tips:
- Log in or register to post comments
TopAh if only I could afford one!
Maybe I can hire a development Engineer?
<º))))><
I am only one lab accident away from becoming a super villain.
- Log in or register to post comments
TopWell some great news, it's all working :) I came back to work last night after gym for a blissful hour with no distractions!
1) I created an ASM file (.S) :
#define __SFR_OFFSET 0
#include <avr/io.h>
.global WS2812Bdriver
WS2812Bdriver:
(perfectly presentable assembler code)>>
ret
2) A header file for the LED routines (.h)
void WS2812Bupdate(void);
3) A file containing the 'C' code
void WS2812Bupdate(void)
{ WS2812Bdriver(LEDbuffer, sizeof(LEDbuffer));
return;
}
Then in 'main' I just call:
WS2812Bupdate();
I do know that I do not need to make the function and I could call the ASM from 'main' directly, but by doing it this way Doxygen works much 'better' :) (or rather does what I want)
I had to write ASM for the low level control of the WS2812Bs as the MPU runs at 16MHz, but it was excellent to have the 8MHz example, thanks so much for that help.
It is up and running and I have a strip of >100 LEDs lighting up and giving me little dots in my vision! I'm really impressed by them, the colours are intense and they are so bright (this is the cause of my little dots!).
This is going to seem like magic to the company, currently they have so many problems with LEDs not meeting the required colours. They have been trying different brands and batches. Also changing resistors on the PCBs! I just need to link a couple of commands into the debug port and we can tweak them remotely, excellent.
<º))))><
I am only one lab accident away from becoming a super villain.
- Log in or register to post comments
TopPages