{"size": 2144, "ext": "js", "max_stars_repo_path": "compiler/native/env/stm32.js", "max_stars_repo_name": "stuartpb/nectarjs", "max_stars_repo_stars_event_min_datetime": "2018-02-02T08:04:00.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-28T17:01:00.000Z", "max_issues_repo_path": "compiler/native/env/stm32.js", "max_issues_repo_name": "stuartpb/nectarjs", "max_issues_repo_issues_event_min_datetime": "2018-02-04T10:16:16.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-28T22:12:36.000Z", "max_forks_repo_path": "compiler/native/env/stm32.js", "max_forks_repo_name": "stuartpb/nectarjs", "max_forks_repo_forks_event_min_datetime": "2018-02-10T07:40:48.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-30T15:03:01.000Z"}
{"max_stars_count": 2867, "max_issues_count": 127, "max_forks_count": 133, "avg_line_length": 30.1971830986, "max_line_length": 296, "alphanum_fraction": 0.5606343284}
var STM32 =
{
  name: "stm32",
  main: "stm32.cpp",
  cli: function(compiler, preset, out, _in, option)
  {
    if(!COMPILER.TARGET) 
    {
      console.log("[!] Error: please specify a target with --target");
      process.exit(1);
    }
    
    var _mbosSrc = path.join(extern, "stm32", "mbed-os", "nectar");
    copyDirSync(COMPILER.TMP_FOLDER, _mbosSrc, true);

    var _profile = "SIZE";
    if(COMPILER.preset == "speed") _profile = "SPEED";

	  return `cd ${path.join(extern, "stm32")} && ${compiler} compile -m ${COMPILER.TARGET} --profile ${path.join(extern, "stm32", "profile", _profile + ".json")} -t GCC_ARM > stm32_debug_res.txt && mv ${path.join(extern, "stm32", "BUILD", COMPILER.TARGET, "GCC_ARM-" + _profile)}/stm32.bin ${out}`;
  },
  clean: function()
  {
    var _mbosSrc = path.join(extern, "stm32", "mbed-os", "nectar");
    rmdir(_mbosSrc);
  },
  compiler: "mbed",
  stdlib:[{bind: "Nectar", module: "stm32"}],
  check: {
      "env": {
          "node": true
      },
      "extends": "eslint:recommended",
      "rules": {
          "no-console": "off",
          "indent": "off",
          "linebreak-style": "off",
          "no-unused-vars": ["warn", { "vars": "all", "args": "after-used", "ignoreRestSiblings": false }],
		  "no-const-assign": "error",
      },
      "globals":
      {
		"undefined": false,
			"eval": false,
            "__njs_typeof": false,
            "console": false,
            "module": false,
            "require": false,
            "__Nectar_Log_Console": false,
			"__Nectar_InitVar": false,
            "__Nectar_Object_Keys": false,
            "__Nectar_Object_Stringify": false,
            "__Nectar_Call_Function": false,
            "__NJS_ARGS": false,
            "__NJS_ENV": false,
            "__NJS_PLATFORM": false,
			"__Nectar_typeof": false,
			"__Nectar_THIS": false,
			"__Nectar_instanceof": false,
			"__Nectar_delete": false,
			"__Nectar_EQUAL_VALUE_AND_TYPE": false,
			"__Nectar_NOT_EQUAL_VALUE_AND_TYPE": false,
            "JSON": false,
            "Object": false,
            "isNaN": false,
			"Array": false,
      }
  }
}

module.exports = STM32;
