Author Topic: Array initialization fails  (Read 8582 times)

0 Members and 1 Guest are viewing this topic.

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 10088
  • Country: us
Re: Array initialization fails
« Reply #25 on: November 02, 2021, 02:05:21 am »
I would replace the #include lines with the EXACT contents of the include file and see what happens.
 

Offline AlfBaz

  • Super Contributor
  • ***
  • Posts: 2187
  • Country: au
Re: Array initialization fails
« Reply #26 on: November 02, 2021, 03:21:26 am »
If it's based on GCC add -E to the command line and look at the files the preprocessor is spits out. This will show you what gets fed into the compiler propper
 

Offline ricko_ukTopic starter

  • Super Contributor
  • ***
  • Posts: 1233
  • Country: fr
Re: Array initialization fails
« Reply #27 on: November 05, 2021, 08:36:11 pm »
UPDATE: I made this post with list of solutions that solved this and other issues. I hope it helps others too. :)
https://www.eevblog.com/forum/projects/solved-mplab-1)-slowno-variables-updates-2)-icd4-not-connecting-3)-others/
« Last Edit: November 06, 2021, 06:01:30 pm by ricko_uk »
 

Offline PlainName

  • Super Contributor
  • ***
  • Posts: 8848
  • Country: 00
Re: Array initialization fails
« Reply #28 on: November 06, 2021, 05:44:50 pm »

UPDATE: I made this post with list of solutions that solved this and other issues. I hope it helps others too. :)
https://www.eevblog.com/forum/projects/solved-mplab-1)-slowno-variables-updates-2)-icd4-not-connecting-3)-others/msg3794567/#msg3794567

I'm afraid you did not. Unless there is some other EEVBlog, perhaps in a parallel universe. Perhaps you could check your links are provide working ones?
 

Offline ricko_ukTopic starter

  • Super Contributor
  • ***
  • Posts: 1233
  • Country: fr
Re: Array initialization fails
« Reply #29 on: November 06, 2021, 06:03:47 pm »
Link updated in reply above and here (the first closing parenthesis were corrupting the URL every time I pasted the link):
https://www.eevblog.com/forum/projects/solved-mplab-1)-slowno-variables-updates-2)-icd4-not-connecting-3)-others/
 

Offline PlainName

  • Super Contributor
  • ***
  • Posts: 8848
  • Country: 00
Re: Array initialization fails
« Reply #30 on: November 06, 2021, 06:24:05 pm »
Thanks  :-+
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 17806
  • Country: fr
Re: Array initialization fails
« Reply #31 on: November 06, 2021, 06:24:16 pm »
Link updated in reply above and here (the first closing parenthesis were corrupting the URL every time I pasted the link):
https://www.eevblog.com/forum/projects/solved-mplab-1)-slowno-variables-updates-2)-icd4-not-connecting-3)-others/

Sorry - TLDR;
So in the end, was your problem of initialization here just a problem with using Dropbox?
 

Offline ricko_ukTopic starter

  • Super Contributor
  • ***
  • Posts: 1233
  • Country: fr
Re: Array initialization fails
« Reply #32 on: November 06, 2021, 06:35:48 pm »
It was:
- Dropbox
- ToolPack update (it was showing it was in sync in the project properties window but the ICD4 firmware was not updating) and the ICD4 was not updating
- Issue in MPLB showing all array content as 0x00 (for at least a multi-dimensional array) when mouse hovering over the array and also in the Variables Watch window. That is during both debug mode and in simulator mode. Microchip has now added that as a bug. BUT in the Watch and Variables windows if you expand the array as far as you can then it shows the data. But you have to expand it all the way to single elements.
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 17806
  • Country: fr
Re: Array initialization fails
« Reply #33 on: November 06, 2021, 06:43:58 pm »
OK... glad I don't use Microchip MCUs anymore. ::)
 

Offline ricko_ukTopic starter

  • Super Contributor
  • ***
  • Posts: 1233
  • Country: fr
Re: Array initialization fails
« Reply #34 on: November 06, 2021, 06:53:54 pm »
What do you use for Microchip micros (if you use them at all)?

I am thinking of moving to Segger IDE to replace MPLAB completely and I just made another post just about that asking for feedback.
https://www.eevblog.com/forum/programming/segger-embedded-studio-to-replace-mplab-for-pic32/msg3796088/#msg3796088

By any chance, do you happen to have tried Microchip micros with Segger IDE?

Thank you
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 17806
  • Country: fr
Re: Array initialization fails
« Reply #35 on: November 06, 2021, 06:58:49 pm »
I don't use Microchips MCUs anymore, haven't for a few years now. But I did use them a lot before that.

Most of the time, I was not using MPLAB. Just building using makefiles, and some programming editor/IDE for editing the source code. Was not using debuggers either usually, but on occasion just MPLAB with ICD4. Those were not recent versions of MPLAB X at the time, though, so I don't know about the latest quirks.

Never used Segger IDE.
 
The following users thanked this post: ricko_uk


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

-->