lpcware

Null Pointer Exception when trying to compile with external DRAM defined in memory configuration editor

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by dwjperry on Tue Nov 26 17:21:42 MST 2013
I'm trying to put some data in the external DRAM on my Embedded Artists LPC4357 dev board. I can read and write to the DRAM directly, but when I try and define the memory in the Memory Configuration Editor (starting address 0x28000000, size of 0x2000000, alias of RAM6) I get the following exception during compilation:


Quote:
java.lang.NullPointerException
  at com.crt.advproject.linker.CreateLinkerScript2.addMemoryProperties(Unknown Source)
  at com.crt.advproject.linker.CreateLinkerScript2.buildLinkerMacros(Unknown Source)
  at com.crt.advproject.linker.CreateLinkerScript2.create(Unknown Source)
  at com.crt.advproject.linker.CreateLinkerScript2.buildScripts(Unknown Source)
  at com.crt.advproject.custom.CRTGnuMakefileGenerator.regenerateMakefiles(Unknown Source)
  at org.eclipse.cdt.managedbuilder.internal.core.CommonBuilder.performMakefileGeneration(CommonBuilder.java:1006)
  at org.eclipse.cdt.managedbuilder.internal.core.CommonBuilder.performPrebuildGeneration(CommonBuilder.java:873)
  at org.eclipse.cdt.managedbuilder.internal.core.CommonBuilder.build(CommonBuilder.java:748)
  at org.eclipse.cdt.managedbuilder.internal.core.CommonBuilder.build(CommonBuilder.java:513)
  at org.eclipse.cdt.managedbuilder.internal.core.CommonBuilder.build(CommonBuilder.java:459)
  at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:726)
  at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
  at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199)
  at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239)
  at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292)
  at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
  at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295)
  at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:256)
  at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:394)
  at org.eclipse.core.internal.resources.Project$1.run(Project.java:618)
  at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
  at org.eclipse.core.internal.resources.Project.internalBuild(Project.java:597)
  at org.eclipse.core.internal.resources.Project.build(Project.java:114)
  at com.crt.ctrlcenter.launch.BuildUtils.buildProjects(Unknown Source)
  at com.crt.ctrlcenter.launch.BuildUtils.access$0(Unknown Source)
  at com.crt.ctrlcenter.launch.BuildUtils$2.run(Unknown Source)
  at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)



The compilation still succeeds, but when I run the code, the variables I try to place in RAM6 (using the prefix __BSS(RAM6) ) don't end up there, and are placed on the built-in RAM instead.

I'm running LPCxpresso 6.0.4. Is this a bug, or have I done something wrong? A workaround for the moment is to directly write data to the DRAM addresses, but it would be nicer if I could let the compiler handle it.

Outcomes