-
Notifications
You must be signed in to change notification settings - Fork 24
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
Segger Embedded Studio for Arm #9
Comments
Die "CrossWorks Tasking Library" ist notwendig. Die kompiliert zwar auch unter Seggers (schließlich ist Segger nur eine rebranded Version von Crossworks), aber gehört soweit ich weiß, nicht dazu. Ich hatte unsprünglich mal FreeRTOS genommen, aber hatte ein paar Probleme und bin dann – wie Loxone anscheinend auch – auf die CTL gegangen. |
Hi, I understand German but writing is another thing... I'll answer in English if you don't mind. @chrisrock1984 , did you make any progress porting this project to Segger? I'm stuck and making no progress on my own. I extracted the missing "System Files" from the free version of CrossStudio and hand-linked the missings. I also added the environment variable "$(TargetDir)=/Users/...". |
Hi, Did not make any progress so far ;( Br |
Apparently I needed to restart Segger in order to load the environment variable, now I got a bit further. I had the "ctl_set_priority()"-error and solved it (I think) by adding "#define __CROSSWORKS_ARM". |
That is the hardest part of getting the STM32 stuff running. I would suggest to create a trivial STM32 example with Segger and compare the project file with the crossworks one. They are almost identical, so you should be able to find what you need to adjust. |
Thanks for the hint, I think my setup is all OK now because I'm getting no more errors and the build completes. Now the real test will be when I get all the hardware for an actual setup. |
Is it possible to share the segger project files as I already have all the hardware ?! Thx |
My hardware has arrived but unfortunately I'm still struggling. @chrisrock1984 I'll try to retrace and write down my steps once everything is up. |
Turns out that the code crashed on |
Another question that may or may not be related to the Segger porting: |
Never mind that last question, I finally have a loxlink extension up and running on two different STM32 eval-boards. I'll try to retrace my steps in the coming days and will try to document the process. |
That would be great!! |
@KjellVerb Is it possible that you share your running segger studio project? |
That would be awesome ;)!!! |
I'm not very eager to share the full project folder because
What I can share is the process of how I got it to work. I restarted from scratch and logged my steps, see attached. |
GREAT!! works for me ;-) was able to compile. now I need to check if it works on silicon ;-) |
You're welcome! |
just trying to follow these instructions using segger emedded studio for arm v5.34 64bit on windows.. I'm getting the following errors linking LoxLink.elf
Struggling a little with the config instructions possibly:
Not sure what I need to do with these when using a STM32103VET.. Added #define __CROSSWORKS_ARM to system.cpp - correct? Any suggestions welcome :) |
Bingo! That compiled.. Now need to to work out how to debug and program with the st-link v2 |
Moin moin (greetings to Hamburg from another town at the river Elbe ;-) ), I could compile the code as it is and program it to an STM32F103VET6 eval board. But at first I'd like to check, what the code does and which GPIO are set. Markus, could you tell us, what else you have connected to your board. The CAN bus control leds are external connected to B13, B14, right?. Is it also possible to use the leds on the eval board. In my case it should be E1 and E0. Are there any other hints to start with your excellent reengineered work? BR maik |
I am using a SEGGER J-Link PRO, which I found at eBay UK several years ago. So, debugging with that one is a non-issue. You can also flash a st-link v2 to a J-Link, which helps. |
I think only onboard st link can be flashed, not the usb dongle version??
…On Sat, 6 Feb 2021, 14:53 Markus Fritze, ***@***.***> wrote:
I am using a SEGGER J-Link PRO, which I found at eBay UK several years
ago. So, debugging with that one is a non-issue. You can also flash a
st-link v2 to a J-Link, which helps.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#9 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADJWV7SSN5UVSGUCUPZXS2DS5VJVNANCNFSM4KO7II4Q>
.
|
Thanks for your feedback. I think the SEGGER J-Link EDU MINI is for me the best option. I tried the example (with the DI and relay extension) as it is, but the miniserver doesn't detect any extension. Both LED are blinking. Any idea? |
@MS-Astra based on your comment, I bought the J-Link EDU mini - and glad I did as previously I was looking at the clones due to the cost. Can confirm that this works fine, had to fiddle with a couple of options in the project to get it working, but can now debug.. Just need to get an CAN bus connection to my desk now and try and get a bit further. |
hey @davidwallis3101, |
I started with the same board as you. The jumpers are for the boot mode of the stock boot loader of the stm32. if boot0 is set to 0 it does not matter what settings you have on boot1. when the two leds are blinking, the application is running, so you are not in the boot loader. |
I've not got as far as blinking leds, any ideas what io is allocated to d2
and d3?
…On Sat, 13 Feb 2021, 17:43 matlab22, ***@***.***> wrote:
I'm connected the board to loxlink but not getting too far at the moment,
need to try and find a schematic for the board I have which is
[image: image]
<https://user-images.githubusercontent.com/13855486/107770906-e0f66000-6d31-11eb-88eb-4ab061f6ec26.png>
can then try and find out what LED is what, and that the two jumpers
marked 0 and 1 are..
David
I started with the same board as you. The jumpers are for the boot mode of
the stock boot loader of the stm32. if boot0 is set to 0 it does not matter
what settings you have on boot1. when the two leds are blinking, the
application is running, so you are not in the boot loader.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#9 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADJWV7RP6Z4IC72S4AUA7TTS6224NANCNFSM4KO7II4Q>
.
|
I've had a play with this today and pulling my hair out.. have traced the io on the board and the gpio for CAN is correct on PB8 and PB9 LED's are PB13 and PB14 but I'm getting effectively a flashing red led, IE both flashing and dont see any CAN comms.. Have a gnd connected between mini server and this PCB, CAN HI and Can LOW connected - have tried reversing polarity.. can anyone confirm which is CAN HI on an extension, Left or Right.. did check with the scope earlier but it's my dads scope and due to the current situation I cant get him here to help me work the damn thing properly.. too frigging complicated to get the damn thing to trigger but that's another story! Bit of a loss as to what to check next other than wonder if the can interface even works on this board! I do have another board without the onboard can and a seperate MCP2551(iirc).. board I could try I guess.. |
@davidwallis3101 can you check if the application could finish the init part for CAN here in LoxCANDriver_STM32.cpp#L126 And my next idea is that we should check if all tasks are running. The LED task is running otherwise it will not blink all the time. |
the remapping was the cause, look at the commit
|
glad that works for you, With mine the transceiver being on PB8 / 9 I think the original code is correct.. It does look like its failing to send the CAN messages at startup correctly if I'm reading this correctly? David |
Hi David, on my board I regonized that the communication only works if I use the external power. With the connected ST-Link it doesn't work. Maybe there is a difference. At the moment the authentification doesn't work in my case. That is my next step. |
Hi, Due to an SSD crash, I needed to reinstall Segger. Luckily I was able to retrace all my steps based on the document I made and shared above. Kjell |
Thanks for checking. I have that file included but in debugio.h it's only declared not defined, so I that's why I get the "undefined" error. |
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
-->I’ve just had a look at the notes I made a while ago on getting this working on windows.. (I’ve not had chance to touch this in a long time though):some may help point you in the right direction (obv paths will need fixing)Download and install Segger Embedded Studio for ARMDownload and install Crossworks for ARM evaluation (code size limited) version - https://cdn.rowleydownload.co.uk/arm/releases/arm_crossworks_4_7_3_win_x86_setup.exe Open Crossworks and install following packages via the package manager: - ARM CPU support package - CMSIS 5 CMSIS-Core(M) support package - Crossworks Tasking Library - STM32F10x Standard Peripherals Library Updates --> C:\Users\Davidw\AppData\Local\SEGGER\SEGGER Embedded Studio\v3\packages\targets\STM32F10x Copy the packages directory from Crossworks to Segger, on Mac these are C:\Program Files\Rowley Associates Limited\CrossWorks for ARM 4.7 - ~/Library/SEGGER/SEGGER Embedded Studio/v3/packages - ~/Library/Rowley Associates Limited/CrossWorks for ARM/v4/packages Xcopy "C:\Users\Davidw\AppData\Local\Rowley Associates Limited\CrossWorks for ARM\v4\packages\*.*" "C:\Users\Davidw\AppData\Local\SEGGER\SEGGER Embedded Studio\v3\packages" /s /e Merge the include directory from Crossworks into Segger, replacing all newer files - ~/Applications/Segger.../include on Windows this is in ProgramData (?) XCopy "C:\Program Files\Rowley Associates Limited\CrossWorks for ARM 4.7\include\*.*" "C:\Program Files\SEGGER\SEGGER Embedded Studio for ARM 5.34\include" /s /e /y Clone the LoxLink and ctl_fifo projects to your PC git clone https://github.com/sarnau/ctl_fifo.gitCopy ctl_fifo to Loxlink/Project/lib/ Execute downloadLoxoneAESKeys.py Change the extension of LoxLink_CW4.6.hzp to *.emproject and open itren LoxLink_CW4.6.hzp LoxLink_CW4.6.emprojectren LoxLink.hzp LoxLink.emproject Change the Project options for common build configuration Build - Correct memory map file - Correct DeviceVectorsFile under Project Macros - Correct target processor Debugger - Change whatever is necessary Preprocessor definitions in .emprojectfile - Change "STM32F103x. to the correct one for your board - add #define __CROSSWORKS_ARM Tools - options - building - Global Macros: add "TargetsDir=/Users/../Library/SEGGER/SEGGER Embedded Studio/v3/packages/targets" or Windows equivalent folder TargetsDir=C:\Users\Davidw\AppData\Local\SEGGER\SEGGER Embedded Studio\v3\packages\targets – works David From: KjellVerbSent: 12 April 2022 07:38To: sarnau/LoxLinkCc: David Wallis; MentionSubject: Re: [sarnau/LoxLink] Segger Embedded Studio for Arm (#9) Thanks for checking. I have that file included but in debugio.h it's only declared not defined, so I that's why I get the "undefined" error.I used to have debug_printf() working in Segger but apparently didn't write down how I got there. I'll let you know if I do.—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
I gave up and just added a return 0 function to solve the debug_printf() error. I'll dearly miss the easy debug prints, luckily I did most of my development already in the past when the prints were still working for me.
I don't think this will help you because you need to get some libraries imported etc. Where did you get stuck? |
@KjellVerb : I also managed to get it running in Segger Studio. But struggeling with same debug_printf() error. |
I basically gave up and added the following to main.cpp:
|
Yes you can get it running with that. But then it is not possible to use debug outputs for debugging. That would be very helpful. |
I agree so if someone is able to fix it, I'm very curious to find the solution! |
Hello! |
I was lucky to find a Segger J-Link PRO on eBay a couple of years ago, which works great. I think on eBay you can find EDU versions for pretty cheap. |
Hi! Thanks for the tip, in what environment should this project be used? What do you suggest? |
CrossStudio or SEGGER both work. I used CrossStudio, because it seems Loxone is using it as well – based on my analysis. SEGGER IDE is just a rebranded version. The licenses are a bit different. I think SEGGER has a free for hobbiest ones. CrossStudio requires a “dongle” (tied to an Ethernet MAC, so I bought a cheap USB Ethernet adapter and tie it to that one, so it is not bound to the actual hardware). |
Do you know a solution for debug_printf so that the output can also be used? :) |
That depends on the IDE. SEGGER and CrossStudio doing it differently, you have to check their debugger support (try with an example project, like hello world) |
i changed it for segger: #include <SEGGER_RTT.h> |
Nice, which debugger do you use for that? |
@KjellVerb : SEGGER J-Link EDU MINI |
Thanks! I'll check to see if this also works with my ST-link V2 clone. |
@KjellVerb Please let me know if you've watched it, I'd be interested in the answer too :)
|
Don't be sorry that it doesn't belong here. I managed to upload the code to my own device. loxone wants to update the firmware continuously. Can something be done with it so that the loxone does not want to update? Thanks |
Check this: |
@challo2018 thanks :)
|
@challo2018 Do you have a working project from this? The code compiles for me, but it doesn't work, the previous version remains and it says update failed. |
Hallo,
Habe versucht das Crossstudio Projekt nach Segger zu portieren. Leider bekomme ich ne Menge Linker Errors. Liegt wahrscheinlich daran, dass Crossstudio Datein benötigt werden.
Hat irgendjemand diese Portierung bereits erledigt?
Andere Alternative, die frei verfügbar ist?
Ich würde gerne, nach Ablauf der Evaluation Phase weiter am Code herumbasteln.
Danke!!
The text was updated successfully, but these errors were encountered: