Unable to remove target from internal database
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have created a traget:
testTarget = target.create("Processor", Name="My Processor", Manufacturer="XXX");
languageimplementation = target.create("LanguageImplementation");
languageimplementation.AtomicFloatSize = 64;
languageimplementation.AtomicIntegerSize = 32;
languageimplementation.DataTypes.Char.Size = 8;
languageimplementation.DataTypes.Double.Size = 64;
languageimplementation.DataTypes.Float.Size = 32;
languageimplementation.DataTypes.Half.IsSupported = false;
languageimplementation.DataTypes.Half.Size = 16;
languageimplementation.DataTypes.Int.Size = 32;
languageimplementation.DataTypes.Long.Size = 32;
languageimplementation.DataTypes.LongLong.Size = 64;
languageimplementation.DataTypes.Pointer.Size = 32;
languageimplementation.DataTypes.PtrDiffT.Size = 32;
languageimplementation.DataTypes.Short.Size = 16;
languageimplementation.DataTypes.SizeT.Size = 32;
languageimplementation.Endianess = "Little";
languageimplementation.WordSize = 32;
testTarget.LanguageImplementations(1) = languageimplementation
objs = target.add(testTarget, UserInstall=false); % don't persist yet until we know how to remove it
% remove the target, attempt 1
target.remove(testTarget);
% remove the target, attempt #2
trgt = target.get('Processor', 'XXX-My Processor');
target.remove(trgt);
% remove the target, attempt #3
target.remove(objs);
% remove the target, attempt 4
target.remove('Processor', 'XXX-My Processor', 'IncludeAssociations', true);
All attempts to remove the target from the internal database fail with the same error message:
Error using targetframework.internal.repository.TargetRepository/remove
Object target.LanguageImplementation is invalid. Use target.create to create the object.
Error in target.remove (line 75)
tr.remove(arguments{:}, options);
The message that the "Object target.LanguageImplementation is invalid" is because the valid flag ist set to 1 in the target's LanguageImplementation.
I am also wondering where Matlab stores the targets. I can find targets in "C:\Program Files\MATLAB_R2021b_x64\toolbox\targetframework\data\model\data.xml". But the targets created by the user don't seem to appear there, even when 'UserInstall' is set to true when adding the target with target.add().
Best Regards,
Juergen
0 Kommentare
Antworten (2)
Meg Noah
am 6 Aug. 2025
testTarget = target.create("Processor", Name="My Processor", Manufacturer="XXX");
languageimplementation = target.create('LanguageImplementation', ...
'Name', 'Armv8-A LP64', ...
'Copy', 'ARM Compatible-ARM Cortex');
languageimplementation.AtomicFloatSize = 64;
languageimplementation.AtomicIntegerSize = 32;
languageimplementation.DataTypes.Char.Size = 8;
languageimplementation.DataTypes.Double.Size = 64;
languageimplementation.DataTypes.Float.Size = 32;
languageimplementation.DataTypes.Half.IsSupported = false;
languageimplementation.DataTypes.Half.Size = 16;
languageimplementation.DataTypes.Int.Size = 32;
languageimplementation.DataTypes.Long.Size = 32;
languageimplementation.DataTypes.LongLong.Size = 64;
languageimplementation.DataTypes.Pointer.Size = 32;
languageimplementation.DataTypes.PtrDiffT.Size = 32;
languageimplementation.DataTypes.Short.Size = 16;
languageimplementation.DataTypes.SizeT.Size = 32;
languageimplementation.Endianess = "Little";
languageimplementation.WordSize = 32;
testTarget.LanguageImplementations = languageimplementation;
target.add(testTarget)
% remove the target, attempt 1
target.remove(testTarget);
0 Kommentare
Jürgen
am 7 Aug. 2025
1 Kommentar
Meg Noah
am 7 Aug. 2025
Bearbeitet: Meg Noah
am 7 Aug. 2025
Hi Jurgen,
I just used the online version here in the comment section. Copy and paste the code into a CODE block and click the RUN (green triangle button) here in a comment. Try this one:
testTarget = target.create("Processor", Name="My Processor", Manufacturer="XXX");
languageimplementation = target.create('LanguageImplementation', ...
'Name', 'MyProcessorImplementation');
languageimplementation.AtomicFloatSize = 64;
languageimplementation.AtomicIntegerSize = 32;
languageimplementation.DataTypes.Char.Size = 8;
languageimplementation.DataTypes.Double.Size = 64;
languageimplementation.DataTypes.Float.Size = 32;
languageimplementation.DataTypes.Half.IsSupported = false;
languageimplementation.DataTypes.Half.Size = 16;
languageimplementation.DataTypes.Int.Size = 32;
languageimplementation.DataTypes.Long.Size = 32;
languageimplementation.DataTypes.LongLong.Size = 64;
languageimplementation.DataTypes.Pointer.Size = 32;
languageimplementation.DataTypes.PtrDiffT.Size = 32;
languageimplementation.DataTypes.Short.Size = 16;
languageimplementation.DataTypes.SizeT.Size = 32;
languageimplementation.Endianess = "Little";
languageimplementation.WordSize = 32;
testTarget.LanguageImplementations = languageimplementation;
target.add(testTarget)
% remove the target, attempt 1
target.remove(testTarget);
Siehe auch
Kategorien
Mehr zu Deployment, Integration, and Supported Hardware finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!